Bird
0
0

After executing kubectl run nginxpod --image=nginx --restart=Never, what information will kubectl describe pod nginxpod display under the 'Containers' section?

medium📝 Command Output Q5 of 15
Kubernetes - Pods
After executing kubectl run nginxpod --image=nginx --restart=Never, what information will kubectl describe pod nginxpod display under the 'Containers' section?
AContainer name 'nginx' with image 'nginx' and restart policy Always
BContainer name 'nginxpod' with image 'nginx' and no restart policy
CContainer name 'nginxpod' with image 'nginx' and restart policy Always
DNo container information will be shown
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command

    The command creates a Pod named 'nginxpod' with the nginx image and restart policy set to Never.
  2. Step 2: Describe Pod output

    The 'Containers' section will show the container named 'nginxpod' using the 'nginx' image and the Pod's restart policy is 'Never'.
  3. Final Answer:

    Container name 'nginxpod' with image 'nginx' and no restart policy -> Option B
  4. Quick Check:

    Container name matches Pod name, restart policy is Never [OK]
Quick Trick: Container name equals Pod name with --restart=Never [OK]
Common Mistakes:
  • Assuming container name is 'nginx' instead of Pod name
  • Confusing restart policy with Deployment defaults
  • Expecting no container info in describe output

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes