-
틀린 문제 #5. Priority Classeskubernetes/CKA 2025. 12. 5. 14:58
문제 1
Now, 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/v1 kind: PriorityClass metadata: name: high-priority preemptionPolicy: PreemptLowerPriority value: 100000# high-priority Priority Class 생성
kubectl apply -f high-priority.yaml# high-prio-pod.yaml 파일 생성
kubectl run high-prio-pod --image=nginx --dry-run=client -o yaml > high-prio-pod.yaml# high-prio-pod.yaml 파일 수정
apiVersion: v1 kind: Pod metadata: labels: run: high-prio-pod name: high-prio-pod spec: priorityClassName: high-priority containers: - image: nginx name: high-prio-pod resources: {} dnsPolicy: ClusterFirst restartPolicy: Always status: {}priorityClassName: high-priority 부분 추가 후 생성
# high-prio-pod 생성
kubectl apply -f high-prio-pod.yaml pod/high-prio-pod created'kubernetes > CKA' 카테고리의 다른 글
Metric Server (0) 2025.12.08 Multiple Scheduler (0) 2025.12.05 Priority Classes (0) 2025.12.05 틀린 문제 #4 Static Pod (0) 2025.12.05 Static pod (0) 2025.12.05