Q1. A pod called rabbit is deployed. Identify the CPU requirements set on the Pod in the current(default) namespace
A1. 1
Q2. Delete the rabbit Pod. Once deleted, wait for the pod to fully terminate.
A2. kubectl delete pod rabbit
Q3. Another pod called elephant has been deployed in the default namespace. It fails to get to a running state. Inspect this pod and identify the Reason why it is not running.
A3. OOMKilled
일반적으로 pod를 실행할 때, 적절한 메모리가 없으면 OOM으로 pod가 제대로 생성되지 않는다.
Q4. The status OOMKilled indicates that it is failing because the pod ran out of memory. Identify the memory limit set on the POD.
A4. OK
Q5. The elephant pod runs a process that consume 15Mi of memory. Increase the limit of the elephant pod to 20Mi. Delete and recreate the pod if required. Do not modify anything other than the required fields.
A5. kubectl edit elephant
다만, edit을 하면 현재 실행되어 있는 pod에 바로 반영되지 않고 /tmp 경로에 yaml 파일이 저장된다.
그러면 기존 pod를 delete하고 create 하면 된다.
Q6. Inspect the status of POD. Make sure it's running
A6. OK
Q7. Delete the elephant Pod. Once deleted, wait for the pod to fully terminate.
A7. kubectl delete elephant
'기술 이모저모 > [K8s] Kubernetes' 카테고리의 다른 글
[k8s] KodeKloud Practice test - Static pod (0) | 2022.10.20 |
---|---|
[k8s] Kubernetes Container Resources request, limit 방법 (0) | 2022.10.10 |
[k8s] Kubernetes NodeAffinity의 개념정리 (0) | 2022.10.10 |
[k8s] Kubernetes Node Taint & Tolerations의 개념정리 (0) | 2022.10.09 |
[k8s] 명령형 접근방법과 선언형 접근방법의 차이 (0) | 2022.10.02 |