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?
- A.type: NodePort with nodePort: 30432
- B.type: LoadBalancer with loadBalancerClass: partner
- C.type: ExternalName with externalName: db.partner-cloud.example
- 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
- Generating a Pod manifest skeleton
- Downward API Pod IP as env
- fsGroup for shared volume ownership
- Indexed Job completion index
- Pulling and unpacking a chart locally
- Kustomize namePrefix and references
- Watching Pod status changes live
- tcpSocket probe for a non-HTTP server
- StatefulSet per-Pod DNS name
- Ways to consume a Secret in a container
- Checking quota usage in a namespace