Deal of the Day! Extra 35% Off - Limited Time Offer - Get Now Offer Ends In 00:00:00 Coupon code: DP35Off

EX280 Exam Dumps

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.