instruction: Create a Kubernetes Deployment configuration with best practices
output: ```yaml
  apiVersion: apps/v1
  kind: Deployment
  metadata:
   name: my-nginx
  spec:
   template:
   spec:
   containers:
   - name: my-nginx
   resources:
   limits:
   memory: 512Mi
  EOF
  
  cat <<EOF >./kustomization.yaml
  resources:
  - deployment.yaml
  patches:
   - path: increase_replicas.yaml
   - path: set_memory.yaml
  EOF
  Run kubectl kustomize ./ to view the Deployment: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
   resources:
   limits:
   memory: 512Mi
  Not all resources or fields support strategicMerge patches. To support modifying arbitrary fields in arbitrary resources,
  Kustomize offers applying JSON patch through Json6902.
  To find the correct Resource for a Json6902 patch, it is mandatory to specify the target field in kustomization.yaml.For example, increasing the replica number of a Deployment object can also be done through Json6902 patch. The target resource
  is matched using group, version, kind, and name from the target field.# Create a deployment.yaml file
  cat <<EOF > deployment.yaml
  ```