본문 바로가기

cloud111

[cka]kodekloud - Labels & selectors 1. We have deployed a number of PODs. They are labelled with tier, env and bu. How many PODs exist in the dev environment (env)? Use selectors to filter the output # k get pods --selector env=dev --no-headers | wc -l : 문제 의도는 여러 라벨링 중 env=dev 인 파드를 찾는것이다. : 첫번째 카운팅을 보면 수량이 7개인데 8개로 확인된다 : 그 이유는 NAME, READY, STATUS, RESTARTS, AGE 제일 상단의 headers 들이 카운팅이 된 것을 확인 할 수 있다. " --no-headers" 옵션을 통해 상단의 줄.. 2022. 6. 8.
[cka] kodekloud-scheduling 1.A pod definition file nginx.yaml is given. Create a pod using the file. Only create the POD for now. We will inspect its status next. CheckCompleteIncomplete 2. What is the status of the created POD? # k get pods A) pending 3. Why is the POD in a pending state? Inspect the environment for various kubernetes control plane components. : 스케줄에 할당되지 않으면 pending 될 수 있다. : NoExecute op = Exists for 3.. 2022. 6. 8.
[cka] kodekloud - IMPERATIVE COMMANDS 이번에는 IMPERATIVE 관련해서 공부해보겠습니다. 1.In this lab, you will get hands-on practice with creating Kubernetes objects imperatively. All the questions in this lab can be done imperatively. However, for some questions, you may need to first create the YAML file using imperative methods. You can then modify the YAML according to the need and create the object using kubectl apply -f command. 2.Deploy a pod .. 2022. 6. 7.
[cka]kodekloud-services 이번에는 services 관련된 문제를 풀어보겠습니다. 1. How many Services exist on the system? # k get services A) 1 2.That is a default service created by Kubernetes at launch. A) ok : 별 내용 없음 3.What is the type of the default kubernetes service? # k get services : 위의 내용 참고 A) ClusterIP 4. What is the targetPort configured on the kubernetes service? # k describe services kubernetes A) 6443 5.How many labels are conf.. 2022. 6. 7.
[cka] kodekloud-namespaces 이번에는 namespaces 관련된 문제를 풀어보자 1. How many Namespaces exist on the system? # k get ns A) 10 2. How many pods exist in the research namespace? # k get pods -n research A)2 3.Create a POD in the finance namespace. Use the spec given below. # k run redis --image=redis -n finance 4. Which namespace has the blue pod in it? # k get pods --all-namespaces 또는 # k get pods -all-namespaces | grep blue A) mar.. 2022. 6. 7.
[cka]kodekloud-Deployments 이번에는 Deployments 관련된 예제를 풀어보도록 하겠습니다. 1. How many PODs exist on the system? # k get pods A) 0 2. How many ReplicaSets exist on the system? # k get rs A) 0 3.How many Deployments exist on the system? # k get deployments.apps : deployments 의 약어는 ds A) 0 4. How many Deployments exist on the system now? # k get deployments.apps 5. How many ReplicaSets exist on the system now? # k get rs A) 1 6.How m.. 2022. 6. 7.