해당 내용은 Udemy의 Certified Kubernetes Administrator (CKA) with Practice Tests 강의를 공부한 내용입니다. 내용을 그대로 번역하기보다는, 제가 이해하기 쉬운 대로 수정한 부분들이 있습니다.
⚠️ 영어 독해가 많이 부족합니다. 틀린 내용이 있으면 알려주시면 감사하겠습니다.
Q1. How many PODs exist on the system? In the current(default) namespace.

답: 0
Q2. How many ReplicaSets exist on the system? In the current(default) namespace.

답: 0
Q3. How many Deployments exist on the system?

답: 0
Q4. How many Deployments exist on the system now?

답: 1
Q5. How many ReplicaSets exist on the system now?
NAME을 보면 방금 생성된 Deployments가 자동으로 생성한 ReplicaSet이라는 것을 확인할 수 있습니다.

답: 1
Q6. How many PODs exist on the system now?
kubectl get pods
커맨드를 입력했을 때 나오는 결과에서 확인할 수 있습니다.

여기에서 확인하고 싶은 것은 deployment가 replicaset을 만들고, replicaset이 pods를 만들었다는 것입니다.
답: 4
Q7. Out of all the existing PODs, how many are ready?

답: 0
Q8. What is the image used to create the pods in the new deployment?
kubectl describe pod 파드이름
커맨드를 통해 확인할 수 있습니다.

답: BUSYBOX888
Q9. Why do you think the deployment is not ready?
kubectl describe pod 파드이름
커맨드의 Events:
에서 에러 메세지를 확인할 수 있습니다.

답: The image BUSYBOX888 doesn’t exist
Q10. Create a new Deployment using the deployment-definition-1.yaml
file located at /root/.
There is an issue with the file, so try to fix it.
kubectl create -f yaml파일
커맨드로 deployment을 만들 수 있습니다.

그런데 에러가 났네요. apiVersion
이나 kind
가 잘못 들어간 것 같습니다.
따라서 yaml 파일을 수정해야 합니다.
vi deployment-definiton-1.yaml
kind
에 deployment를 Deployement로 바꿔줍니다.

수정 후, 다시 deployment 생성 커맨드를 실행합니다.

Q11. Create a new Deployment with the below attributes using your own deployment definition file.
Name: httpd-frontend
;
Replicas: 3
;
Image: httpd:2.4-alpine
아래 명령어로 생성할 수 있습니다.
kubectl create deployment httpd-frontend --replicas=3 --image=httpd:2.4-alpine
헷갈릴 때는 kubectl create deployment --help
커맨드로 필요한 옵션을 확인할 수 있습니다.

'MLOps > Doker & Kubernetes' 카테고리의 다른 글
Udemy CKA 강의 정리 37: Services - Loadbalancer (0) | 2023.01.05 |
---|---|
Udemy CKA 강의 정리 36: Services Cluster IP (0) | 2023.01.05 |
Udemy CKA 강의 정리 33: Practice Test - Deployments (0) | 2023.01.05 |
Udemy CKA 강의 정리 35: Services (0) | 2023.01.04 |
Udemy CKA 강의 정리 32: Certification Tip! (0) | 2023.01.04 |
댓글