instruction: Create a Kubernetes configuration for deployments | kubernetes
output: ```dockerfile
  Name: nginx-deployment
  Namespace: default
  CreationTimestamp: Tue, 15 Mar 2016 14:48:04 -0700
  Labels: app=nginx
  Selector: app=nginx
  Replicas: 3 desired | 1 updated | 4 total | 3 available | 1 unavailable
  StrategyType: RollingUpdate
  MinReadySeconds: 0
  RollingUpdateStrategy: 25% max unavailable, 25% max surge
  Pod Template:
   Labels: app=nginx
   Containers:
   nginx:
   Image: nginx:1.161
   Port: 80/TCP
   Host Port: 0/TCP
   Environment: <none>
   Mounts: <none>
   Volumes: <none>
  Conditions:
   Type Status Reason
   ---- ------ ------
   Available True MinimumReplicasAvailable
   Progressing True ReplicaSetUpdated
  OldReplicaSets: nginx-deployment-1564180365 (3/3 replicas created)
  NewReplicaSet: nginx-deployment-3066724191 (1/1 replicas created)
  Events:
   FirstSeen LastSeen Count From SubObjectPath Type Reason Message
   --------- -------- ----- ---- ------------- -------- ------ -------
   1m 1m 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set nginx-deployment-2035384211 to 3
   22s 22s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set nginx-deployment-1564180365 to 1
   22s 22s 1 {deployment-controller } Normal ScalingReplicaSet Scaled down replica set nginx-deployment-2035384211 to 2
   22s 22s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set nginx-deployment-1564180365 to 2
   21s 21s 1 {deployment-controller } Normal ScalingReplicaSet Scaled down replica set nginx-deployment-2035384211 to 1
   21s 21s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set nginx-deployment-1564180365 to 3
   13s 13s 1 {deployment-controller } Normal ScalingReplicaSet Scaled down replica set nginx-deployment-2035384211 to 0
   13s 13s 1 {deployment-controller } Normal ScalingReplicaSet Scaled up replica set nginx-deployment-3066724191 to 1
  ```
  
  ## Error Handling and Troubleshooting
  
  ### Common Issues and Solutions
  
  **Issue 1: Container startup failures**
  ```bash
  # Check container logs
  docker logs <container_id>
  
  # Debug with interactive shell
  docker run -it --entrypoint /bin/sh <image_name>
  ```
  
  **Issue 2: Resource constraints**
  ```bash
  # Check resource usage
  kubectl top pods
  kubectl describe pod <pod_name>
  
  # Scale resources if needed
  kubectl patch deployment <deployment_name> -p '{{"spec":{{"template":{{"spec":{{"containers":[{{"name":"<container_name>","resources":{{"requests":{{"memory":"256Mi","cpu":"200m"}},"limits":{{"memory":"512Mi","cpu":"400m"}}}}}}]}}}}}}}'
  ```
  
  **Issue 3: Network connectivity**
  ```bash
  # Test service connectivity
  kubectl exec -it <pod_name> -- wget -qO- <service_name>:<port>/health
  
  # Check service endpoints
  kubectl get endpoints <service_name>
  ```
  
  ### Monitoring and Alerts
  
  Set up proper monitoring to catch issues early:
  
  ```yaml
  # Example alert rule
  groups:
  - name: application.rules
    rules:
    - alert: HighErrorRate
      expr: rate(http_requests_total{{status=~"5.."}}}[5m]) > 0.1
      for: 5m
      annotations:
        summary: "High error rate detected"
        description: "Error rate is above 10% for 5 minutes"
  ```