Complete the command to check the desired replicas of a deployment.
kubectl get deployment my-app -o jsonpath='{{.spec.replicas}}' | grep [1]
The desired number of replicas is stored under the spec.replicas field in the deployment manifest.
Complete the command to check the actual number of replicas currently running.
kubectl get deployment my-app -o jsonpath='{{.[1].replicas}}'
The actual number of replicas running is found under the status.replicas field.
Fix the error in the command to get the number of ready replicas.
kubectl get deployment my-app -o jsonpath='{{.status.[1]'
The correct field name is readyReplicas with camelCase and no underscores or dashes.
Fill both blanks to create a command that shows desired and actual replicas side by side.
kubectl get deployment my-app -o jsonpath='{.[1].replicas} {.[2].replicas}'
The spec.replicas shows desired replicas, and status.replicas shows actual replicas.
Fill all three blanks to create a command that outputs desired replicas, ready replicas, and updated replicas.
kubectl get deployment my-app -o jsonpath='{.[1].replicas} {.[2].[3]'
spec.replicas is desired replicas, status.readyReplicas is ready replicas, and status.updatedReplicas is updated replicas.