nerdexam
Google

ASSOCIATE-CLOUD-ENGINEER · Question #152

You have created a Kubernetes deployment, called Deployment-A, with 3 replicas on your cluster. Another deployment, called Deployment-B, needs access to Deployment-A. You cannot expose Deployment-A ou

The correct answer is D. Create a Service of type ClusterIP for Deployment A. Have Deployment B use the Service IP. A is not correct because this exposes Deployment A over the public internet. B is not correct because LoadBalancer will expose the service publicly. C is not correct because this exposes the service externally using a cloud provider's load balancer, and Ingress can work only with

Submitted by tom_us· Mar 30, 2026Deploying and implementing a cloud solution

Question

You have created a Kubernetes deployment, called Deployment-A, with 3 replicas on your cluster. Another deployment, called Deployment-B, needs access to Deployment-A. You cannot expose Deployment-A outside of the cluster. What should you do?

Options

  • ACreate a Service of type NodePort for Deployment A and an Ingress Resource for that Service.
  • BCreate a Service of type LoadBalancer for Deployment A. Have Deployment B use the Service IP
  • CCreate a Service of type LoadBalancer for Deployment A and an Ingress Resource for that
  • DCreate a Service of type ClusterIP for Deployment A. Have Deployment B use the Service IP

How the community answered

(36 responses)
  • A
    6% (2)
  • B
    3% (1)
  • C
    11% (4)
  • D
    81% (29)

Explanation

A is not correct because this exposes Deployment A over the public internet. B is not correct because LoadBalancer will expose the service publicly. C is not correct because this exposes the service externally using a cloud provider's load balancer, and Ingress can work only with nodeport, not LoadBalancer. D is correct because this exposes the service on a cluster-internal IP address. Choosing this method makes the service reachable only from within the cluster. https://kubernetes.io/docs/concepts/services-networking/service/

Topics

#Kubernetes Service#ClusterIP#internal networking#deployment communication

Community Discussion

No community discussion yet for this question.

Full ASSOCIATE-CLOUD-ENGINEER Practice