A developer deploys a set of Pods labeled app=frontend and wants to expose them internally within the cluster on a stable IP. Which resource should be used?
Trap 1: Service of type NodePort
NodePort exposes externally; not needed for internal-only access.
Trap 2: Service of type LoadBalancer
LoadBalancer exposes externally via cloud provider.
Trap 3: Ingress resource
Ingress requires a Service to route traffic to Pods.
- A
Service of type NodePort
Why wrong: NodePort exposes externally; not needed for internal-only access.
- B
Service of type LoadBalancer
Why wrong: LoadBalancer exposes externally via cloud provider.
- C
Service of type ClusterIP
Correct: ClusterIP provides a stable internal IP.
- D
Ingress resource
Why wrong: Ingress requires a Service to route traffic to Pods.