본문 바로가기

분류 전체보기133

[cka] Labels and 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 --selector 옵션을 통해 등록된 pods의 Label을 선택 할 수 있다. $ controlplane ~ ➜ kubectl get pods --selector env=dev --no-headersdb-1-sft8z 1/1 Running 0 89sdb-1-hx2th 1/1 Running 0 89sapp-1-8jvbt 1/1 Running 0 89sapp-.. 2024. 6. 8.
[cka] Manual 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. $ controlplane ~ ➜ k apply -f nginx.yaml pod/nginx created  2.  What is the status of the created POD?$ controlplane ~ ➜ k get podsNAME READY STATUS RESTARTS AGEnginx 0/1 Pending 0 31s answer : Pending 3. Why is the POD in a pending .. 2024. 6. 8.
[cka] Imperative Command k8s 오브젝트를 관리하는 방법 1. Declarative Management - 선언형2. Imperative Management - 명령형 2. Deploy a pod named nginx-pod using the nginx:alpine image.Use imperative commands only. $ controlplane ~ ➜ k run nginx-pod --image nginx:alpine pod/nginx-pod created  3. Deploy a redis pod using the redis:alpine image with the labels set to tier=db.Either use imperative commands to create the pod with the labels... 2024. 6. 1.
[cka] Services 1. How many Services exist on the system? In the current(default) namespace $ controlplane ~ ✖ k get serviceNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEkubernetes ClusterIP 10.43.0.1 443/TCP 14m answer: 1 2. 추가 서비스가 기동됨. 3. What is the type of the default kubernetes service? $ controlplane ~ ➜ k describe svc kubernetesName: kubernetesNamespace:.. 2024. 6. 1.
[cka] namespace 1. How many Namespaces exist on the system? $ controlplane ~ ➜ k get nsNAME STATUS AGEkube-system Active 6m39skube-public Active 6m39skube-node-lease Active 6m39sdefault Active 6m39sfinance Active 31smarketing Active 31sdev Active 31sprod Active 31smanufacturing Active 31sresearch .. 2024. 5. 28.
반응형