CertKeen

Certified Kubernetes Application Developer (CKAD) · Free practice question 9 of 12

ExternalName Service for an outside host

Apps at Polperro Freight call a managed database at db.partner-cloud.example. The team wants in-cluster clients to use the stable name `orders-db` so the target can change later without app changes. Which Service fits?

  1. A.type: NodePort with nodePort: 30432
  2. B.type: LoadBalancer with loadBalancerClass: partner
  3. C.type: ExternalName with externalName: db.partner-cloud.example
  4. D.type: ClusterIP with selector app=orders-db
Show answer and explanation

Correct answer: C. type: ExternalName with externalName: db.partner-cloud.example

Why: An ExternalName Service makes cluster DNS return a CNAME record for the given external hostname, so orders-db resolves to the managed database with no proxying. A selector-based ClusterIP needs in-cluster Pods, and NodePort or LoadBalancer Services expose in-cluster backends outward rather than aliasing an outside host.

More free Certified Kubernetes Application Developer (CKAD) questions