Choose the best description of what a ClusterIP service does inside a Kubernetes cluster.
Think about whether the service is reachable from outside the cluster or only inside.
A ClusterIP service type creates an internal IP address that other pods inside the cluster can use to reach the service. It does not expose the service outside the cluster.
Given the command kubectl get svc my-service with this output, what is the ClusterIP address?
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-service ClusterIP 10.96.123.45 <none> 80/TCP 5m
Look for the column labeled 'CLUSTER-IP'.
The ClusterIP address is shown under the 'CLUSTER-IP' column. It is the internal IP used by other pods to access the service.
Which YAML snippet correctly defines a Kubernetes service of type ClusterIP exposing port 8080?
Check the type field for the service type.
Option A explicitly sets type: ClusterIP, which is the default and correct for a ClusterIP service. Option A omits the type, which defaults to ClusterIP but is less explicit. Options B and C specify other service types.
You created a ClusterIP service, but external clients cannot reach it. What is the reason?
Think about the network scope of ClusterIP services.
ClusterIP services are designed to be reachable only within the cluster. External access requires other service types like NodePort or LoadBalancer.
To maintain stable communication between pods using a ClusterIP service, what is the best practice?
Consider what changes when pods restart or reschedule.
Pod IPs can change when pods restart, so using the service's DNS name (which points to the ClusterIP) ensures stable communication inside the cluster.