0
0
Microservicessystem_design~20 mins

Kubernetes basics review in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Kubernetes Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Kubernetes Pod Status Check
What is the output of the command kubectl get pods immediately after creating a Pod with an invalid image name?
Microservices
kubectl run invalid-pod --image=nonexistentimage12345 --restart=Never
kubectl get pods
A
NAME          READY   STATUS             RESTARTS   AGE
invalid-pod   0/1     ImagePullBackOff   0          10s
B
NAME          READY   STATUS    RESTARTS   AGE
invalid-pod   1/1     Running   0          10s
CError from server (NotFound): pods "invalid-pod" not found
D
NAME          READY   STATUS    RESTARTS   AGE
invalid-pod   0/1     Completed 0          10s
Attempts:
2 left
💡 Hint
Think about what happens when Kubernetes cannot pull the container image.
🧠 Conceptual
intermediate
1:30remaining
Kubernetes Service Types
Which Kubernetes Service type exposes the service on a cluster-internal IP only, making it reachable only within the cluster?
AExternalName
BLoadBalancer
CNodePort
DClusterIP
Attempts:
2 left
💡 Hint
Think about which service type does not expose ports outside the cluster.
Troubleshoot
advanced
2:00remaining
Debugging Kubernetes Deployment Rollout Failure
You deployed a new version of your app using a Deployment, but the rollout is stuck and pods are not becoming ready. Which kubectl command helps you see detailed rollout status and errors?
Akubectl describe deployment <deployment-name>
Bkubectl rollout status deployment/<deployment-name>
Ckubectl logs deployment/<deployment-name>
Dkubectl get pods --watch
Attempts:
2 left
💡 Hint
Look for a command that specifically tracks rollout progress.
🔀 Workflow
advanced
2:30remaining
Kubernetes ConfigMap Usage
You want to update a ConfigMap used by a running Pod without restarting the Pod. Which approach allows the Pod to see the updated ConfigMap data automatically?
AMount the ConfigMap as a volume inside the Pod
BPass ConfigMap data as environment variables to the Pod
CUse kubectl exec to manually update files inside the Pod
DDelete and recreate the Pod after updating the ConfigMap
Attempts:
2 left
💡 Hint
Think about how Kubernetes handles ConfigMap volumes and environment variables.
Best Practice
expert
3:00remaining
Kubernetes Resource Limits and Requests
What is the main reason to set both resource requests and limits for containers in a Kubernetes Pod?
ATo guarantee the container gets exactly the requested resources at all times
BTo ensure the container never uses more CPU or memory than requested
CTo allow Kubernetes scheduler to place Pods efficiently and prevent resource overuse
DTo automatically restart the Pod if it exceeds resource usage
Attempts:
2 left
💡 Hint
Consider how Kubernetes uses requests and limits differently for scheduling and runtime.