kubernetes/CKA
-
틀린 문제 #6. Rolling Updates and Rollbackskubernetes/CKA 2025. 12. 10. 10:04
문제 1Let us try that. Upgrade the application by setting the image on the deployment to kodekloud/webapp-color:v2Do not delete and re-create the deployment. Only set the new image name for the existing deployment. Deployment Name: frontend Deployment Image: kodekloud/webapp-color:v2# Deployment 확인kubectl get deployNAME READY UP-TO-DATE AVAILABLE AGEfrontend 4/4 4 4 ..
-
Metric Serverkubernetes/CKA 2025. 12. 8. 11:09
Metric Server# Metric Server 설치kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml # Node 모니터링kubectl top nodeNAME CPU(cores) CPU(%) MEMORY(bytes) MEMORY(%) controlplane 227m 1% 924Mi 1% node01 29m 0% 156Mi 0% # Pod 모니터링kubectl top podNAME CPU(cores)..
-
Multiple Schedulerkubernetes/CKA 2025. 12. 5. 16:30
Multiple SchedulerKubernetes 클러스터에서 기본 스케줄러(kube-scheduler) 외에 추가로 커스텀 스케줄러를 여러 개 실행하여,Pod 배치를 서로 다른 스케줄러가 분담하도록 하는 구조를 말합니다. 아주 쉽게 말하면,기본 스케줄러 하나로 모든 Pod를 배치하지 않고,여러 개의 스케줄러가 각각 특정 Pod를 배치하도록 역할을 나누는 것.🔹 왜 Multiple Scheduler를 쓰나?1) 서로 다른 스케줄링 정책을 사용하기 위해기본 스케줄러는 일반적인 Load 기반 스케줄링커스텀 스케줄러는 GPU 우선, 비용 우선, 데이터 지역성 우선 같은 특수 로직➡️ 서로 다른 로직을 적용하고 싶을 때.2) 특정 Pod만 커스텀 스케줄러로 배치하고 싶을 때예: AI/ML 훈련 Pod는 GP..
-
틀린 문제 #5. Priority Classeskubernetes/CKA 2025. 12. 5. 14:58
문제 1Now, create another pod in the default namespace named high-prio-pod that runs an nginx image and uses the high-priority PriorityClass.# high-priority.yaml 파일 생성kubectl create priorityclass high-priority --dry-run=client -o yaml > high-priority.yaml # high-priority.yaml 파일 수정apiVersion: scheduling.k8s.io/v1kind: PriorityClassmetadata: name: high-prioritypreemptionPolicy: PreemptLowerPriorit..
-
Priority Classeskubernetes/CKA 2025. 12. 5. 14:04
Priority ClassesPriorityClass란 Kubernetes에서 Pod의 우선순위(Priority) 를 정의하는 객체입니다.우선순위가 높은 Pod일수록, 클러스터 자원이 부족할 때 스케줄링에서 우선권을 갖고,심지어 낮은 우선순위 Pod를 Evict(축출) 시켜 자원을 확보할 수도 있습니다.✅ PriorityClass가 왜 필요할까?클러스터 자원이 부족한 상황에서:중요한 시스템 Pod(예: CoreDNS, Fluentd, Ingress Controller)는 살아 있어야 하고덜 중요한 워크로드는 죽어도 괜찮을 수 있음→ 이런 상황에서 "Pod마다 중요도" 를 설정하는 기능이 바로 PriorityClass.✅ 동작 방식 PriorityClass를 만들면 value 라는 숫자를 지정합니다.Pri..
-
틀린 문제 #4 Static Podkubernetes/CKA 2025. 12. 5. 11:18
문제 1Create a static pod named static-busybox that uses the busybox image , run in the default namespace and the command sleep 1000# --dry-run=client -o yaml 명령어로 static-busybox.yaml 파일 생성kubectl run static-busybox --image=busybox --dry-run=client -o yaml --command -- sleep 1000 > static-busybox.yaml # static pods 생성을 위해 static-busybox.yaml 파일을 /etc/kubernetes/manifests로 이동cp static-busybox.yaml ..
-
Static podkubernetes/CKA 2025. 12. 5. 10:20
Static Pod(정적 파드)는 kubelet이 직접 관리하는 Pod로,API Server에 의해 관리되지 않는 Pod를 말해.✅ Static Pod의 특징 (핵심 요약)생성 주체kubelet (API Server가 아님)저장 위치/etc/kubernetes/manifests/ 같은 로컬 디렉토리생성 방식해당 폴더에 YAML 파일 넣으면 kubelet이 자동 실행API server에 표시?✔️ Mirror Pod 형태로 read-only만 보임스케줄러 관여?❌ 없음 (스케줄링 없이 해당 노드에서 바로 실행)용도etcd, api-server, controller-manager, scheduler 같은 control-plane 구성요소 실행🔍 Static Pod 동작 구조kubelet은 주기적으로 특정 ..
-
틀린 문제 # DaemonSetkubernetes/CKA 2025. 12. 5. 09:29
Deploy a DaemonSet for FluentD Logging.Use the given specifications. Name: elasticsearch Namespace: kube-system Image: registry.k8s.io/fluentd-elasticsearch:1.20# Deployment를 이용하여 yaml 파일 추출kubectl create deployment elasticsearch -n kube-system --image=registry.k8s.io/fluentd-elasticsearch:1.20 --dry-run=client -o yaml > fluentd.yaml 왜 이렇게 하냐면, DaemonSet은 커맨드로 생성이 안된다.그래서 Deployment 생성 파일을 활용하여..