instruction: Write a complete Kubernetes deployment manifest with ConfigMap, Secret, Service, and Ingress
output: Here's a complete Kubernetes application deployment:
  
  ```yaml
  # ConfigMap for application configuration
  apiVersion: v1
  kind: ConfigMap
  metadata:
   name: app-config
   namespace: production
  data:
   app.properties: |
   server.port=8080
   logging.level=INFO
   database.pool.size=10
   nginx.conf: |
   events {
   worker_connections 1024;
   }
   http {
   upstream app {
   server localhost:8080;
   }
   server {
   listen 80;
   location / {
   proxy_pass http://app;
   }
   }
   }
  
  ---
  # Secret for sensitive data
  apiVersion: v1
  kind: Secret
  metadata:
   name: app-secrets
   namespace: production
  type: Opaque
  data:
   database-password: cGFzc3dvcmQxMjM= # base64 encoded
   api-key: YWJjZGVmZ2hpams=
  
  ---
  # Deployment
  apiVersion: apps/v1
  kind: Deployment
  metadata:
   name: web-app
   namespace: production
   labels:
   app: web-app
   version: v1.2.0
  spec:
   replicas: 3
   selector:
   matchLabels:
   app: web-app
   template:
   metadata:
   labels:
   app: web-app
   version: v1.2.0
   spec:
   containers:
   - name: app
   image: myregistry/web-app:v1.2.0
   ports:
   - containerPort: 8080
   env:
   - name: DATABASE_PASSWORD
   valueFrom:
   secretKeyRef:
   name: app-secrets
   key: database-password
   - name: API_KEY
   valueFrom:
   secretKeyRef:
   name: app-secrets
   key: api-key
   volumeMounts:
   - name: config-volume
   mountPath: /etc/config
   - name: nginx-config
   mountPath: /etc/nginx
   livenessProbe:
   httpGet:
   path: /health
   port: 8080
   initialDelaySeconds: 30
   periodSeconds: 10
   readinessProbe:
   httpGet:
   path: /ready
   port: 8080
   initialDelaySeconds: 5
   periodSeconds: 5
   resources:
   requests:
   memory: "256Mi"
   cpu: "250m"
   limits:
   memory: "512Mi"
   cpu: "500m"
   volumes:
   - name: config-volume
   configMap:
   name: app-config
   items:
   - key: app.properties
   path: application.properties
   - name: nginx-config
   configMap:
   name: app-config
   items:
   - key: nginx.conf
   path: nginx.conf
  
  ---
  # Service
  apiVersion: v1
  kind: Service
  metadata:
   name: web-app-service
   namespace: production
   labels:
   app: web-app
  spec:
   selector:
   app: web-app
   ports:
   - name: http
   port: 80
   targetPort: 8080
   protocol: TCP
   type: ClusterIP
  
  ---
  # Ingress
  apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
   name: web-app-ingress
   namespace: production
   annotations:
   kubernetes.io/ingress.class: nginx
   cert-manager.io/cluster-issuer: letsencrypt-prod
   nginx.ingress.kubernetes.io/ssl-redirect: "true"
   nginx.ingress.kubernetes.io/rate-limit: "100"
  spec:
   tls:
   - hosts:
   - api.example.com
   secretName: web-app-tls
   rules:
   - host: api.example.com
   http:
   paths:
   - path: /
   pathType: Prefix
   backend:
   service:
   name: web-app-service
   port:
   number: 80
  ```
  
  This includes:
  - ConfigMap for non-sensitive configuration
  - Secret for sensitive data (base64 encoded)
  - Deployment with health checks and resource limits
  - Service for internal communication
  - Ingress with TLS and rate limiting