Udemy Labs - Certified Kubernetes Application Developer - Rolling Updates & Rollbacks 오답노트

hyereen·2025년 1월 26일

Kubernetes

목록 보기
17/53

11
Change the deployment strategy to Recreate

Delete and re-create the deployment if necessary. Only update the strategy type for the existing deployment.

Deployment Name: frontend

Deployment Image: kodekloud/webapp-color:v2

Strategy: Recreate

정답

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend
  namespace: default
spec:
  replicas: 4
  selector:
    matchLabels:
      name: webapp
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        name: webapp
    spec:
      containers:
      - image: kodekloud/webapp-color:v2
        name: simple-webapp
        ports:
        - containerPort: 8080
          protocol: TCP

0개의 댓글