
Explanation:
The correct answer is D because it exposes the service on a cluster-internal IP address, making it accessible only within the cluster. This meets the requirement of not exposing Deployment-A outside the cluster.
Ultimate access to all questions.
No comments yet.
You've set up a Kubernetes deployment named Deployment-A with 3 replicas in your cluster. Deployment-B requires access to Deployment-A, but Deployment-A must not be exposed outside the cluster. What's the best approach?
A
Create a Service of type NodePort for Deployment A and an Ingress Resource for that Service. Have Deployment B use the Ingress IP address.
B
Create a Service of type LoadBalancer for Deployment A. Have Deployment B use the Service IP address.
C
Create a Service of type LoadBalancer for Deployment A and an Ingress Resource for that Service. Have Deployment B use the Ingress IP address.
D
Create a Service of type ClusterIP for Deployment A. Have Deployment B use the Service IP address.