0
0
Kubernetesdevops~10 mins

Quality of Service classes (Guaranteed, Burstable, BestEffort) in Kubernetes - Interactive Code Practice

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

Complete the YAML to set a pod with the BestEffort QoS class by leaving out resource requests and limits.

Kubernetes
apiVersion: v1
kind: Pod
metadata:
  name: best-effort-pod
spec:
  containers:
  - name: app
    image: nginx
    resources:
      [1]
Drag options to blanks, or click blank then click option'
Arequests: {}
Blimits: {}
C(none)
Drequests: memory: "128Mi" limits: memory: "256Mi"
Attempts:
3 left
💡 Hint
Common Mistakes
Setting resource requests or limits causes the pod to be Burstable or Guaranteed.
Using empty requests or limits keys still counts as setting resources.
2fill in blank
medium

Complete the YAML to set a pod with Burstable QoS by specifying resource requests but no limits.

Kubernetes
apiVersion: v1
kind: Pod
metadata:
  name: burstable-pod
spec:
  containers:
  - name: app
    image: nginx
    resources:
      requests:
        memory: [1]
Drag options to blanks, or click blank then click option'
A"256Mi"
B"512Mi"
C"128Mi"
D"1Gi"
Attempts:
3 left
💡 Hint
Common Mistakes
Setting limits causes the pod to be Guaranteed.
Using too small or too large values may not be realistic.
3fill in blank
hard

Fix the error in this pod spec to make it Guaranteed QoS by matching requests and limits exactly.

Kubernetes
apiVersion: v1
kind: Pod
metadata:
  name: guaranteed-pod
spec:
  containers:
  - name: app
    image: nginx
    resources:
      requests:
        cpu: "500m"
        memory: "256Mi"
      limits:
        cpu: [1]
Drag options to blanks, or click blank then click option'
A"1"
B"250m"
C"500m"
D"1000m"
Attempts:
3 left
💡 Hint
Common Mistakes
Setting limits lower or higher than requests causes Burstable QoS.
Using different units causes errors.
4fill in blank
hard

Fill both blanks to create a pod with Burstable QoS by setting CPU requests and limits correctly.

Kubernetes
apiVersion: v1
kind: Pod
metadata:
  name: burstable-pod
spec:
  containers:
  - name: app
    image: nginx
    resources:
      requests:
        cpu: [1]
      limits:
        cpu: [2]
Drag options to blanks, or click blank then click option'
A"250m"
B"500m"
C"1000m"
D"125m"
Attempts:
3 left
💡 Hint
Common Mistakes
Setting requests equal to limits makes pod Guaranteed.
Setting requests higher than limits is invalid.
5fill in blank
hard

Fill all three blanks to define a pod with Guaranteed QoS by matching CPU and memory requests and limits.

Kubernetes
apiVersion: v1
kind: Pod
metadata:
  name: guaranteed-pod
spec:
  containers:
  - name: app
    image: nginx
    resources:
      requests:
        cpu: [1]
        memory: [2]
      limits:
        cpu: [3]
        memory: [2]
Drag options to blanks, or click blank then click option'
A"500m"
B"256Mi"
C"500m"
D"128Mi"
Attempts:
3 left
💡 Hint
Common Mistakes
Using different values for requests and limits causes Burstable QoS.
Mixing units or missing memory limits causes errors.