✔️ Correct Answer: A
Explanation:
The correct choice is Option A because:
1. Proper Pod Creation:
-
kubectl run nginx --image=nginx --restart=Never
creates a Pod, not a deployment.
-
This satisfies the requirement to create a standalone Pod using the nginx
image.
2. Verbosity Levels with kubectl get
:
-
-v=0
: Minimal/default verbosity.
-
-v=6
: Shows API calls and some debug info.
-
-v=9
: Shows maximum verbosity, including HTTP requests/responses.
-
These commands demonstrate how to check pod status with different verbosity levels, as the task demands.
Why Other Options Are Incorrect:
B.
-
Uses kubectl create deployment
, which creates a Deployment, not a standalone Pod.
-
Misses the -v=9
level. Doesn’t fulfill the “create a Pod” instruction.
C.
-
Omits --restart=Never
, which means it defaults to creating a Deployment, not a Pod.
-
Only includes one verbosity level (-v=9
), missing the rest.
D.
-
Correctly creates a Pod, but does not use -v
flags for verbosity.
-
Uses kubectl describe pods
, which is not asked for in the question.
✔️ Correct Answer: A
Explanation:
The correct choice is Option A because:
1. Proper Pod Creation:
-
kubectl run nginx --image=nginx --restart=Never
creates a Pod, not a deployment.
-
This satisfies the requirement to create a standalone Pod using the nginx
image.
2. Verbosity Levels with kubectl get
:
-
-v=0
: Minimal/default verbosity.
-
-v=6
: Shows API calls and some debug info.
-
-v=9
: Shows maximum verbosity, including HTTP requests/responses.
-
These commands demonstrate how to check pod status with different verbosity levels, as the task demands.
Why Other Options Are Incorrect:
B.
-
Uses kubectl create deployment
, which creates a Deployment, not a standalone Pod.
-
Misses the -v=9
level. Doesn’t fulfill the “create a Pod” instruction.
C.
-
Omits --restart=Never
, which means it defaults to creating a Deployment, not a Pod.
-
Only includes one verbosity level (-v=9
), missing the rest.
D.
-
Correctly creates a Pod, but does not use -v
flags for verbosity.
-
Uses kubectl describe pods
, which is not asked for in the question.