instruction: Create a Kubernetes Deployment configuration with best practices
output: ```yaml
  apiVersion: apps/v1
  kind: Deployment
  metadata:
   name: my-nginx
  spec:
   selector:
   matchLabels:
   run: my-nginx
   replicas: 2
   template:
   metadata:
   labels:
   run: my-nginx
   spec:
   containers:
   - name: my-nginx
   image: nginx
   ports:
   - containerPort: 80
  EOF
  
  # Create a json patch
  cat <<EOF > patch.yaml
  - op: replace
   path: /spec/replicas
   value: 3
  EOF
  
  # Create a kustomization.yaml
  cat <<EOF >./kustomization.yaml
  resources:
  - deployment.yaml
  
  patches:
  - target:
   group: apps
   version: v1
   kind: Deployment
   name: my-nginx
   path: patch.yaml
  EOF
  Run kubectl kustomize ./ to see the replicas field is updated:apiVersion: apps/v1
  kind: Deployment
  metadata:
   name: my-nginx
  spec:
   replicas: 3
   selector:
   matchLabels:
   run: my-nginx
   template:
   metadata:
   labels:
   run: my-nginx
   spec:
   containers:
   - image: nginx
   name: my-nginx
   ports:
   - containerPort: 80
  In addition to patches, Kustomize also offers customizing container images or injecting field values from other objects into containers
  without creating patches. For example, you can change the image used inside containers by specifying the new image in the images field
  in kustomization.yaml.cat <<EOF > deployment.yaml
  ```