기술 이모저모/[K8s] Kubernetes

[k8s] KodeKloud Practice test - Resouce Limis

Kobby 2022. 10. 10. 18:15

Q1. A pod called rabbit is deployed. Identify the CPU requirements set on the Pod in the current(default) namespace

A1. 1

답 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

답 3
답 3 -2

일반적으로 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

답 5

다만, 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