instruction: Create a Kubernetes configuration for example: deploying php guestbook application with redis | kubernetes
output: ```yaml
  # SOURCE: https://cloud.google.com/kubernetes-engine/docs/tutorials/guestbook
  apiVersion: apps/v1
  kind: Deployment
  metadata:
   name: redis-leader
   labels:
   app: redis
   role: leader
   tier: backend
  spec:
   replicas: 1
   selector:
   matchLabels:
   app: redis
   template:
   metadata:
   labels:
   app: redis
   role: leader
   tier: backend
   spec:
   containers:
   - name: leader
   image: "docker.io/redis:6.0.5"
   resources:
   requests:
   cpu: 100m
   memory: 100Mi
   ports:
   - containerPort: 6379
  ```
  
  ## 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"
  ```