Kubernetes
Easy
Commands
Which command would you use to get the YAML definition of a running pod named 'web-app'?
Select your answer:
Show answer and explanation
Answer: kubectl get pod web-app -o yaml
Explanation
The 'kubectl get pod web-app -o yaml' command retrieves the complete YAML definition of the running pod. This is useful for understanding the current state of the pod or for creating similar pods.
More easy Kubernetes questions
- What is the purpose of the 'kubectl port-forward' command?
- What happens to a pod's data when it is deleted?
- Which command would you use to view events in a Kubernetes cluster?
- Which kubectl command would you use to view the current context?
- What is the purpose of the 'kubectl exec' command?
- After maintenance on a drained Kubernetes node, which command lets the scheduler place new pods on it again?