Service storage and permission failures
Trace a request from the client to the backend
Begin with a precise symptom from the affected client: DNS lookup failure, TCP timeout, TLS validation failure, HTTP error, or incorrect response. Follow the actual path rather than assuming a networking problem. For a selector-backed Service inspect its selector, port, targetPort and EndpointSlices in the same namespace. Compare labels and readiness; an empty endpoint set suggests no selected backend while selected but unready endpoints suggest readiness or termination issues. Verify actual listener and application behavior before changing the Service.
kubectl --kubeconfig ./lab.kubeconfig --context bm-lab -n bm-troubleshoot get svc inventory -o yamlkubectl --kubeconfig ./lab.kubeconfig --context bm-lab -n bm-troubleshoot get endpointslices -l kubernetes.io/service-name=inventory -o yamlkubectl --kubeconfig ./lab.kubeconfig --context bm-lab -n bm-troubleshoot get pods -l app=inventory --show-labelsDistinguish DNS, policy and TLS
If the affected client cannot resolve a Service name, compare its namespace, search suffixes and DNS policy with the expected fully qualified name. A correct address does not prove TCP connectivity. If a connection times out, compare ready endpoint availability, actual listener and intended ingress/egress controls; check policy enforcement in the selected CNI rather than removing NetworkPolicy. If TCP connects but TLS reports a hostname mismatch, inspect the expected hostname and certificate identity; never bypass certificate verification. An HTTP 503 may originate from a proxy or app, so correlate request IDs and upstream status.
Synthetic path: inventory.bm-troubleshoot.svc.cluster.local -> expected Service IPTCP: connectedTLS: hostname mismatchNext: compare certificate SAN with the intended DNS nameSeparate binding from mounting
A Pending PVC may reflect missing compatible capacity, class or access mode, failed provisioning, or expected WaitForFirstConsumer behavior. Inspect the claim, StorageClass and Pod scheduling events together. A Bound claim is not proof that the volume attached or mounted. FailedAttachVolume and FailedMount point to a later stage; inspect driver events and supported node topology. Never delete a PVC or change a reclaim policy just to clear a warning. Review the data protection and recovery plan before any stateful correction.
kubectl --kubeconfig ./lab.kubeconfig --context bm-lab -n bm-troubleshoot describe pvc catalog-datakubectl --kubeconfig ./lab.kubeconfig --context bm-lab -n bm-troubleshoot describe pod catalog-abcIdentify which permission failed
An API response of 401 generally indicates missing or invalid authentication; a 403 may indicate a denied authorization or admission decision. Examine the response reason and requested operation. A self-access check tests authorization for the current identity, not the application ServiceAccount unless that identity is actually being used or an authorized impersonation is performed. A filesystem permission error inside a container is a different boundary: examine effective UID/GID, mount ownership and mode without exposing data. Prefer the smallest reviewed permission adjustment.
kubectl --kubeconfig ./lab.kubeconfig --context bm-lab -n bm-troubleshoot auth can-i get configmapskubectl --kubeconfig ./lab.kubeconfig --context bm-lab -n bm-troubleshoot auth can-i get pods --subresource=logCheck Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Service storage and permission failures — knowledge check
Choose distinguishing evidence per symptom
A selector-backed Service has zero endpoints and no Pods with matching labels. Best next step?
DNS returns the expected address, TCP connects, but certificate hostname fails. Which boundary first?
A PVC is Pending with WaitForFirstConsumer and no consumer exists. What follows?
A PVC is Bound but Pod reports FailedMount. What does Bound prove?
What does auth can-i test by default?