MLOps/Doker & Kubernetes

Udemy CKA 강의 정리 75: Solution - Static Pods (optional)

공부하는 무니 2023. 1. 10. 04:59
반응형

해당 내용은 Udemy의 Certified Kubernetes Administrator (CKA) with Practice Tests 강의를 공부한 내용입니다. 내용을 그대로 번역하기보다는, 제가 이해하기 쉬운 대로 수정한 부분들이 있습니다.

⚠️ 영어 독해가 많이 부족합니다. 틀린 내용이 있으면 알려주시면 감사하겠습니다.


(보충 필요)

Q1. How many static pods exist in this cluster in all namespaces?

kubectl get pods --all-namespaces로 확인합니다.

Q2. Which of the below components is NOT deployed as a static pod?

마찬가지로 kubectl get pods --all-namespaces로 확인합니다.

Q3. Which of the below components is NOT deployed as a static POD?

마찬가지로 kubectl get pods --all-namespaces로 확인합니다.

Q4. On which nodes are the static pods created currently?

kubectl get pods --all-namespaces -o wide로 확인합니다.

Q5. What is the path of the directory holding the static pod definition files?

ps -aux | grep kubelet로 확인합니다.

Q6. How many pod definition files are present in the manifests folder?

/etc/kubernetes/manifests 아래의 파일 수를 확인합니다.

Q7. What is the docker image used to deploy the kube-api server as a static pod?

/etc/kubernetes/manifests/kube-apiserver.yaml 파일의 image를 확인합니다.

Q8. Create a static pod named static-busybox that uses the busybox image and the command sleep 1000

kubectl run --restart=Never --image=busybox static-busybox --dry-run -o yaml --command -- sleep 1000 > /etc/kubernetes/manifests/static-busybox.yaml

Q9. Edit the image on the static pod to use busybox:1.28.4

/etc/kubernetes/manifests/static-busybox.yaml

파일 수정

Q10. We just created a new static pod named static-greenbox. Find it and delete it.

kubectl get pods -o wide
kubectl get nodes -o wide
ssh <ip address of pod>
grep staticPodPath /var/lib/kubelet/config.yaml
node01 $ rm -rf /etc/just-to-mess-with-you/greenbox.yaml
반응형