k8wiz
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.

Read more about Kubernetes