Question 18
Domain 4: Services, Networking, and Service DiscoveryWhich command best confirms that a Service of type ClusterIP has been created and also shows its endpoints?
Correct answer: A
Explanation
`kubectl get svc,endpoints` lists both Services and Endpoints in one command, so it confirms the Service object exists and shows the endpoint addresses tied to it. A Service of type ClusterIP is exposed as a Service resource, and its backing endpoints are displayed by the Endpoints resource.
Why each option is right or wrong
A. kubectl get svc,endpoints
`kubectl get` accepts multiple resource types in a single invocation, and `svc` is the standard short name for the Service resource while `endpoints` is the core/v1 Endpoints object that records the backing IP:port targets. In Kubernetes, a ClusterIP Service is created as a Service object and its selected pods are reflected in the Endpoints list, so `kubectl get svc,endpoints` verifies both resources at once and shows the endpoint addresses associated with that Service.
B. kubectl describe pod <pod-name>
C. kubectl get nodes -o wide
D. kubectl logs service/<service-name>