EX280 Exam Dumps
Showing the single result
EX280 Exam Sample Question
Deploy an application using Kustomize with environment-specific overlays for dev and prod. Validate the deployment.
Answer: See the Solution below.
Solution:
1. Create a base Kustomize directory: # base/deployment.yaml
apiVersion: apps/v1 kind: Deployment metadata:
name: my-app spec:
replicas: 2 selector: matchLabels:
app: my-app template:
metadata:
labels:
app: my-app spec:
containers:
– name: app-container image: nginx
2. Create overlays for dev and prod:
# overlays/dev/kustomization.yaml resources:
– ../../base
– replicas: my-app: 1
# overlays/prod/kustomization.yaml resources:
– ../../base replicas:
my-app: 3
3. Deploy the prod overlay:
kubectl apply -k overlays/prod
Explanation:
Kustomize overlays provide a clean way to manage environment-specific configurations without duplicating base manifests.
- Sale!
