티스토리 뷰

Architecture/k8s

[CKAD] ReplicaSets

GOD동하 2021. 3. 22. 15:35

Q. How many ReplicaSets exist on the system?

 

A. kubectl get replicaset

 

결과

 

 

Q. How many PODs are DESIRED in the new-replica-set

 

A. kubectl get replicaset

 

-> 4

 

 

Q. What is the image used to create the pods in the new-replica-set?

 

A. kubectl describe replicaset

 

 

 

Q. How many PODs are READY in the new-replica-set

 

A. kubectl get replicaset

 

 

 

Q. Why do you think the PODs are not ready

 

A. kubectl describe pods

 

 

 

Q. Delete any one of the 4 PODs

 

A. kubectl get pods

    kubectl delete pod ${pod_name}

 

 

 

Q. How many PODs exist now?

 

A. kubectl get pods

 

 

Q. Why are there still 4 PODs, even after you deleted one?

 

A. 항상 4 replica 유지하려고

kubectl edit replicaset

 

 

 

Q. Create a ReplicaSet using the 'replicaset-definition-1.yaml' file located at /root/ (There is an issue with the file, so fix it.)

 

A. cat /root/replicaset-definition-1.yaml

kubectl explain replicaset | grep VERSION

kubectl apply -f replicaset-definition-1.yaml

 

 

 

Q. Fix the issue in the replicaset-definition-2.yaml file and create a ReplicaSet using it. (This file is located at /root/)

 

A. kubectl apply -f replicaset-definition-2.yaml

 

 

label nginx 맞춰야

 

kubectl apply -f replicaset-definition-2.yaml

 

 

Q. Delete the two newly created ReplicaSets - replicaset-1 and replicaset-2

 

A. kubectl get rs

 

kubectl delete rs replicaset-1

kubectl delete rs replicaset-2

 

Q. Fix the original replica set 'new-replica-set' to use the correct 'busybox' image

 

 

 

 

Q. Scale the ReplicaSet to 5 PODs

 

A. kubectl edit rs new-replica-set

kubectl get rs

 

'Architecture > k8s' 카테고리의 다른 글

[Helm] 로컬 환경 Helm 테스트 구성  (0) 2021.03.24
[CKAD] Pods  (0) 2021.03.22
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함