# For staging environment
kubectl apply -k k8s-manifests/overlays/staging
# For production environment
kubectl apply -k k8s-manifests/overlays/production
Base Configurations:
base/deployment.yaml: Defines the basic deployment configuration for my-app.
base/service.yaml: Creates a Service to expose the my-app container on port 80, targeting container port 8001.
base/kustomization.yaml: Includes the base deployment and service YAML files.
Environment-Specific Overlays:
overlays/staging/kustomization.yaml and overlays/production/kustomization.yaml: Each overlay refers to the base configuration and applies an environment-specific replica-patch.yaml.
replica-patch.yaml: Adjusts the replicas count based on the environment (e.g., 2 for staging and 3 for production).