Create Kubernetes Deployment Manifests
Objective: Author Kubernetes manifests for production deployment.
Description: This subtask involves creating base manifests and environment-specific overlays using Kustomize for production deployment.
Dependencies: Finalize GitHub Actions CI/CD Pipeline
Details:
- Create base Kubernetes manifests for all core services.
- Develop overlays for different environments (dev, staging, prod) using Kustomize.
- Store manifests in the
infrastructure/directory.
Status: Done
Test Strategy:
Deploy to a local Kubernetes cluster and verify all pods are running using kubectl get pods.
Kubernetes Manifests Structure
flowchart TD
A[Base Manifests] --> B[Dev Overlay]
A --> C[Staging Overlay]
A --> D[Prod Overlay]
B --> E[Deployed Services]
C --> E
D --> E
Explanatory Notes
- Base Manifests: Define the core configuration for all environments, ensuring consistency and reducing duplication.
- Overlays: Allow customization for dev, staging, and prod without modifying the base. This supports safe experimentation and controlled rollouts.
- Kustomize: Enables declarative management of overlays and simplifies complex deployments.
- Best Practices:
- Store manifests and overlays under version control.
- Use environment variables and secrets for sensitive data.
- Validate manifests with
kubectl apply --dry-run=clientbefore deploying.
- Troubleshooting:
- Check pod status with
kubectl get podsand logs withkubectl logs <pod>. - Ensure resource limits and dependencies are correctly set.
- Check pod status with