Which service type acts as a DNS alias to another domain?

Study for the Kubernetes Cloud Native Associate (KCNA) Certification. Prepare with flashcards and multiple choice questions. Ensure success with detailed explanations. Ready for your exam!

Multiple Choice

Which service type acts as a DNS alias to another domain?

Explanation:
ExternalName is the service type that acts as a DNS alias to another domain. When you create a service with type ExternalName and set spec.externalName to an external hostname, Kubernetes does not allocate a cluster IP or create endpoints. Instead, the service’s DNS name resolves directly to that external domain, so pods using the service name reach the external resource as if it were a DNS alias inside the cluster. This is useful for referencing existing external services from Kubernetes without adding a proxy. Other service types—ClusterIP, NodePort, and LoadBalancer—expose services inside or at the edge of the cluster and do not provide a DNS alias to a different domain.

ExternalName is the service type that acts as a DNS alias to another domain. When you create a service with type ExternalName and set spec.externalName to an external hostname, Kubernetes does not allocate a cluster IP or create endpoints. Instead, the service’s DNS name resolves directly to that external domain, so pods using the service name reach the external resource as if it were a DNS alias inside the cluster. This is useful for referencing existing external services from Kubernetes without adding a proxy. Other service types—ClusterIP, NodePort, and LoadBalancer—expose services inside or at the edge of the cluster and do not provide a DNS alias to a different domain.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy