Which TWO of the following are valid ways to expose a set of pods as a network service in Kubernetes? (Select two.)
ClusterIP allocates a virtual IP reachable only inside the cluster, and kube-proxy load-balances connections across the selected pods. It is the default Service type and a valid way to expose pods internally to other workloads.
Why this answer
Option E (Creating a Service of type ClusterIP) is correct because a ClusterIP Service provides a stable virtual IP and DNS name that load-balances traffic to the set of pods matched by its label selector, which is the fundamental way to expose pods internally. Option A is not correct because a Deployment only manages pod replicas and their labels; it does not itself create a network endpoint or stable service address. Option B is not correct because a PersistentVolumeClaim provides storage, not network exposure.
Option C is not correct because an Ingress exposes Services (via an ingress controller), not pods directly, and therefore is not itself a way to expose a set of pods as a network service. Option D is not correct because assigning a public IP directly to a Pod is not a supported or durable Kubernetes service-exposure mechanism, since pod IPs are ephemeral and not managed as service endpoints.
Exam trap
A common misconception is that a Deployment itself provides network exposure, but a Deployment only manages pod replicas and requires a separate Service resource to expose them as a network service. Another trap is assuming Ingress directly exposes pods; Ingress routes to Services, which then select pods.