Recall & Review
beginner
What command shows detailed information about a specific Pod in Kubernetes?
Use
kubectl describe pod <pod-name> to see detailed information about a Pod, including its status, events, and container details.Click to reveal answer
beginner
How do you view the logs of a container inside a Pod?
Use
kubectl logs <pod-name> to see the logs of the main container in the Pod. For multiple containers, add -c <container-name>.Click to reveal answer
beginner
What does the command
kubectl get pods show?It lists all Pods in the current namespace with their names, ready status, restarts, and age.
Click to reveal answer
intermediate
How can you follow logs in real-time for a Pod?
Add the
-f option to the logs command: kubectl logs -f <pod-name>. This streams new log entries as they appear.Click to reveal answer
intermediate
What information can you find in the output of
kubectl describe pod?You see Pod status, container states, events like restarts or failures, and networking details.
Click to reveal answer
Which command shows the logs of a Pod named 'web-app'?
✗ Incorrect
The correct command to view logs is
kubectl logs <pod-name>.How do you get detailed status and events of a Pod?
✗ Incorrect
Use
kubectl describe pod <pod-name> to get detailed info including events.What option allows you to stream logs live?
✗ Incorrect
The
-f option streams logs live as they are generated.If a Pod has multiple containers, how do you specify which container's logs to view?
✗ Incorrect
Use
-c <container-name> to specify the container.What does
kubectl get pods NOT show?✗ Incorrect
kubectl get pods does not show logs; it shows a summary list of Pods.Explain how to check the status and recent events of a Kubernetes Pod.
Think about a command that gives you more than just a list.
You got /3 concepts.
Describe the steps to view and follow logs of a container inside a Pod.
Logs can be viewed and streamed live.
You got /3 concepts.