0
0
Kubernetesdevops~10 mins

Priority classes for critical workloads in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a PriorityClass named 'high-priority' with a value of 1000.

Kubernetes
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
  name: high-priority
value: [1]
globalDefault: false
description: "High priority class for critical workloads"
Drag options to blanks, or click blank then click option'
A500
B100
C10
D1000
Attempts:
3 left
💡 Hint
Common Mistakes
Using a low priority value like 10 or 100 for critical workloads.
2fill in blank
medium

Complete the code to assign the 'high-priority' PriorityClass to a Pod spec.

Kubernetes
apiVersion: v1
kind: Pod
metadata:
  name: critical-pod
spec:
  priorityClassName: [1]
  containers:
  - name: app
    image: nginx
Drag options to blanks, or click blank then click option'
Ahigh-priority
Bdefault
Clow-priority
Dsystem-node-critical
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'default' or a non-existent PriorityClass name.
3fill in blank
hard

Fix the error in the PriorityClass definition by completing the missing field.

Kubernetes
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
  name: [1]
value: 1000
globalDefault: false
description: "Critical workload priority"
Drag options to blanks, or click blank then click option'
Alow-priority
Bsystem-cluster-critical
Chigh-priority
Ddefault
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'default' or unrelated names causing conflicts.
4fill in blank
hard

Fill both blanks to create a PriorityClass with a value of 2000 and set it as the global default.

Kubernetes
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
  name: [1]
value: [2]
globalDefault: true
description: "Default priority for critical workloads"
Drag options to blanks, or click blank then click option'
Acritical-default
B1000
C2000
Dhigh-priority
Attempts:
3 left
💡 Hint
Common Mistakes
Using a low value or forgetting to set globalDefault to true.
5fill in blank
hard

Fill all three blanks to create a Pod spec that uses the 'critical-default' PriorityClass and runs an nginx container.

Kubernetes
apiVersion: v1
kind: Pod
metadata:
  name: [1]
spec:
  priorityClassName: [2]
  containers:
  - name: [3]
    image: nginx
Drag options to blanks, or click blank then click option'
Anginx-pod
Bcritical-default
Capp-container
Ddefault
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'default' priorityClassName or mismatching container names.