Question 7
Domain 5: Observability, Troubleshooting, and MaintenanceWhich kubectl command is used to verify that a pushed image exists in a registry and can be pulled by a Kubernetes node?
Correct answer: C
Explanation
`kubectl run test-pod --image=<registry>/<image>:<tag> --restart=Never --command -- sleep 3600` creates a one-off pod that uses the specified image, so Kubernetes must pull it from the registry. If the image is missing or inaccessible, the pod will fail to start, which verifies that the node can pull the image.
Why each option is right or wrong
A. kubectl describe pod <pod-name>
B. kubectl exec <pod-name> -- docker pull <registry>/<image>:<tag>
C. kubectl run test-pod --image=<registry>/<image>:<tag> --restart=Never --command -- sleep 3600
`kubectl run` with `--restart=Never` creates a single Pod object rather than a Deployment, so the kubelet must attempt an actual image pull for that exact `<registry>/<image>:<tag>` reference. Adding `--command -- sleep 3600` keeps the container alive long enough to observe whether the pull succeeded; if the image cannot be fetched, the Pod will remain in `ImagePullBackOff`/`ErrImagePull`, which is the direct verification point here.
D. kubectl get events --sort-by=.metadata.creationTimestamp