← CKA: Kubernetes administration and troubleshooting
08 / 13 · 45 MIN

Exposure, Gateway, and name resolution

Choose an exposure path and interpret conditions, references, and DNS symptoms.

Choose and observe the exposure path

ClusterIP provides a service endpoint inside the cluster. NodePort adds a port on node addresses eligible under the implementation and configuration; it does not itself open external firewalls. LoadBalancer depends on an implementation provisioning the balancer, and status can remain pending until that dependency is satisfied.

Do not impose the same architecture on every provider: some implementations route directly to Pods. For every option, connect selectors, EndpointSlices, ports, readiness, and client path. Success via Pod IP eliminates some hypotheses but does not prove operation through the public endpoint.

Ingress and Gateway as controller contracts

An Ingress needs a controller interpreting its class and rules. With Gateway API, identify GatewayClass, Gateway, listener, and Route. Compare metadata.generation with observedGeneration before treating conditions as current evidence.

Accepted, ResolvedRefs, and Programmed answer different questions; a favorable condition does not prove client completion. Also read per-listener or per-parent Route conditions. If status is stale or absent, check ownership and the responsible controller before changing the backend.

CRD version and implementation capabilities also constrain configuration.

Authorize cross-namespace references

An HTTPRoute in shop referencing a Service in payments needs the corresponding target-namespace authorization through ReferenceGrant. The payments owner limits permitted origin, kind, and destination. Giving the author RBAC permission to create the Route does not replace that consent.

Route–Gateway attachment uses a different mechanism, including listener allowedRoutes; do not exchange the two contracts. A valid reference neither creates network authorization nor proves backend responsiveness. Permit the necessary relationship and observe its resolution without broadening cross-team access for convenience.

DNS: distinguish failure scope

Compare a fully qualified Service query and an external-name query from the same Pod. If the first works and the second fails, investigate upstream forwarding, DNS configuration, and connectivity while matching the hypothesis to evidence. If both fail, start with Pod DNS configuration, DNS Service, EndpointSlices, and path policies.

A short name depends on namespace and search list. CoreDNS authorization errors for Services or EndpointSlices suggest a different problem from an upstream resolver timeout. Avoid unnecessarily publishing sensitive queries when collecting logs.

kubectl --context=lab -n shop get service checkout -o yaml
kubectl --context=lab -n shop get endpointslices -l kubernetes.io/service-name=checkout -o yaml
kubectl --context=lab -n shop get httproute checkout -o yaml
kubectl --context=lab -n edge get gateway public -o yaml
IN PRACTICE

A Route changed from generation 8 to 9 to use a backend in another namespace. The dashboard still shows Accepted=True for generation 8. Check current status and reference authorization, then observe the response through the hostname and path clients use.

Common pitfalls

Confusing a published address with a functioning service; reading stale conditions; using RBAC instead of ReferenceGrant; attributing every DNS failure to the Service name.

Related topics: Kubernetes administration · Diagnosis and recovery

Take this idea with you

Follow the client request and tie each decision to object state and its responsible implementation.

Create account

References

Kubernetes® and CKA are trademarks or registered trademarks of The Linux Foundation. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by The Linux Foundation. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.