Challenge - 5 Problems
Kubectl Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate2:00remaining
What is the output of this kubectl command?
You run
kubectl get pods --namespace=default in your Azure Kubernetes cluster. What will this command display?Attempts:
2 left
💡 Hint
Think about what 'get pods' and 'namespace' mean in kubectl commands.
✗ Incorrect
The command 'kubectl get pods --namespace=default' lists all pods in the default namespace, showing their names, statuses, and how long they've been running.
❓ Configuration
intermediate2:00remaining
Which kubectl command correctly scales a deployment?
You want to scale the deployment named
webapp to 5 replicas in your Azure Kubernetes cluster. Which command will do this?Attempts:
2 left
💡 Hint
Look for the standard kubectl subcommand to change replicas.
✗ Incorrect
The correct syntax to scale a deployment is 'kubectl scale deployment --replicas='.
❓ security
advanced2:00remaining
What error occurs when running kubectl without proper cluster credentials?
You run
kubectl get pods but your kubeconfig file is missing or invalid. What error message will you most likely see?Attempts:
2 left
💡 Hint
Think about authentication errors when credentials are missing.
✗ Incorrect
Without valid credentials, kubectl cannot authenticate and returns an Unauthorized error.
❓ Architecture
advanced2:00remaining
Which kubectl command shows the node where a pod is running?
You want to find out on which node the pod named
backend-xyz is running. Which command will give you this information?Attempts:
2 left
💡 Hint
Look for a command that shows detailed pod info including node name.
✗ Incorrect
The '-o wide' option with 'kubectl get pod' shows extra details including the node name where the pod runs.
✅ Best Practice
expert3:00remaining
What is the recommended way to update a deployment image without downtime?
You want to update the container image of deployment
api-server to api:v2 in your Azure Kubernetes cluster. Which kubectl command follows best practices to avoid downtime?Attempts:
2 left
💡 Hint
Consider commands that update images with rolling updates.
✗ Incorrect
Using 'kubectl set image' updates the deployment image and triggers a rolling update, avoiding downtime.