1 line
4.1 KiB
JSON
1 line
4.1 KiB
JSON
{"content": "---\nallowed-tools: Read, Write, Edit, Bash\nargument-hint: [deployment-type] | --microservices | --monolith | --stateful | --full-stack | --production-ready\ndescription: Configure comprehensive Kubernetes deployment with manifests, security, scaling, and production best practices\n---\n\n# Kubernetes Deployment Configuration\n\nConfigure Kubernetes deployment: $ARGUMENTS\n\n## Current Environment Analysis\n\n- Application type: @package.json or @Dockerfile (detect containerization readiness)\n- Existing K8s config: !`find . -name \"*.yaml\" -o -name \"*.yml\" | grep -E \"(k8s|kubernetes|deployment|service)\" | head -3`\n- Cluster access: !`kubectl cluster-info 2>/dev/null | head -2 || echo \"No cluster access\"`\n- Container registry: @docker-compose.yml or check for registry configuration\n- Resource requirements: Analysis needed based on application type\n\n## Task\n\nImplement production-ready Kubernetes deployment:\n\n1. **Kubernetes Architecture Planning**\n - Analyze application architecture and deployment requirements\n - Define resource requirements (CPU, memory, storage, network)\n - Plan namespace organization and multi-tenancy strategy\n - Assess high availability and disaster recovery requirements\n - Define scaling strategies and performance requirements\n\n2. **Cluster Setup and Configuration**\n - Set up Kubernetes cluster (managed or self-hosted)\n - Configure cluster networking and CNI plugin\n - Set up cluster storage classes and persistent volumes\n - Configure cluster security policies and RBAC\n - Set up cluster monitoring and logging infrastructure\n\n3. **Application Containerization**\n - Ensure application is properly containerized\n - Optimize container images for Kubernetes deployment\n - Configure multi-stage builds and security scanning\n - Set up container registry and image management\n - Configure image pull policies and secrets\n\n4. **Kubernetes Manifest Creation**\n - Create Deployment manifests with proper resource limits\n - Set up Service manifests for internal and external communication\n - Configure ConfigMaps and Secrets for configuration management\n - Create PersistentVolumeClaims for data storage\n - Set up NetworkPolicies for security and isolation\n\n5. **Load Balancing and Ingress**\n - Configure Ingress controllers and routing rules\n - Set up SSL/TLS termination and certificate management\n - Configure load balancing strategies and session affinity\n - Set up external DNS and domain management\n - Configure traffic management and canary deployments\n\n6. **Auto-scaling Configuration**\n - Set up Horizontal Pod Autoscaler (HPA) based on metrics\n - Configure Vertical Pod Autoscaler (VPA) for resource optimization\n - Set up Cluster Autoscaler for node scaling\n - Configure custom metrics and scaling policies\n - Set up resource quotas and limits\n\n7. **Health Checks and Monitoring**\n - Configure liveness and readiness probes\n - Set up startup probes for slow-starting applications\n - Configure health check endpoints and monitoring\n - Set up application metrics collection\n - Configure alerting and notification systems\n\n8. **Security and Compliance**\n - Configure Pod Security Standards and policies\n - Set up network segmentation and security policies\n - Configure service accounts and RBAC permissions\n - Set up secret management and rotation\n - Configure security scanning and compliance monitoring\n\n9. **CI/CD Integration**\n - Set up automated Kubernetes deployment pipelines\n - Configure GitOps workflows with ArgoCD or Flux\n - Set up automated testing in Kubernetes environments\n - Configure blue-green and canary deployment strategies\n - Set up rollback and disaster recovery procedures\n\n10. **Operations and Maintenance**\n - Set up cluster maintenance and update procedures\n - Configure backup and disaster recovery strategies\n - Set up cost optimization and resource management\n - Create operational runbooks and troubleshooting guides\n - Train team on Kubernetes operations and best practices\n - Set up cluster lifecycle management and governance"} |