본문 바로가기

IT 기술/k8s59

[cka] Node Affinity Node Affinity란? 파드를 특정 노드나 노드 그룹에 스케줄링하는 방법을 제공합니다.이는 스케줄링 제약 조건을 정의하는 데 사용되며, Node Affinity는 nodeSelector, requiredDuringSchedulingIgnoredDuringExecution, 및 preferredDuringSchedulingIgnoredDuringExecution과 같은 다양한 방법을 통해 설정할 수 있습니다. 1. How many Labels exist on node node01?$ controlplane ~ ✖ k describe nodes node01Name: node01Roles: Labels: beta.kubernetes.i.. 2024. 6. 8.
[cka] Taints and Tolerations 1. How many nodes exist on the system?Including the controlplane node. $ controlplane ~ ➜ k get nodesNAME STATUS ROLES AGE VERSIONcontrolplane Ready control-plane 6m18s v1.29.0node01 Ready 5m38s v1.29.0 answer : 2 2. Do any taints exist on node01 node?controlplane ~ ➜ k describe node node01 | grep -i taintsTaints:  answer : .. 2024. 6. 8.
[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.
반응형