0
0
Kubernetesdevops~10 mins

Desired replicas vs actual replicas in Kubernetes - Interactive Practice

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

Complete the command to check the desired replicas of a deployment.

Kubernetes
kubectl get deployment my-app -o jsonpath='{{.spec.replicas}}' | grep [1]
Drag options to blanks, or click blank then click option'
Astatus
Bspec
Cmetadata
Ditems
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'status' instead of 'spec' to find desired replicas.
Confusing 'metadata' with replica count.
2fill in blank
medium

Complete the command to check the actual number of replicas currently running.

Kubernetes
kubectl get deployment my-app -o jsonpath='{{.[1].replicas}}'
Drag options to blanks, or click blank then click option'
Aspec
Bmetadata
Cstatus
Ditems
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'spec' instead of 'status' to get actual replicas.
Trying to get replicas from 'metadata'.
3fill in blank
hard

Fix the error in the command to get the number of ready replicas.

Kubernetes
kubectl get deployment my-app -o jsonpath='{{.status.[1]'
Drag options to blanks, or click blank then click option'
AreadyReplicas
Bready_replicas
Cready-replicas
DreadyReplicasCount
Attempts:
3 left
💡 Hint
Common Mistakes
Using underscores or dashes in the field name.
Guessing field names without checking Kubernetes docs.
4fill in blank
hard

Fill both blanks to create a command that shows desired and actual replicas side by side.

Kubernetes
kubectl get deployment my-app -o jsonpath='{.[1].replicas} {.[2].replicas}'
Drag options to blanks, or click blank then click option'
Aspec
Bstatus
Cmetadata
Ditems
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up 'spec' and 'status' fields.
Using 'metadata' which does not contain replica info.
5fill in blank
hard

Fill all three blanks to create a command that outputs desired replicas, ready replicas, and updated replicas.

Kubernetes
kubectl get deployment my-app -o jsonpath='{.[1].replicas} {.[2].[3]'
Drag options to blanks, or click blank then click option'
Aspec
Bstatus
CreadyReplicas
DupdatedReplicas
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong field names for ready replicas.
Confusing updated replicas with ready replicas.