liveBook · Manning

Projected volume

As explained in Acing the Certified Kubernetes Administrator Exam, Second Edition

A Kubernetes volume type that presents projected sources such as service-account credentials to a pod.

A projected volume mounts short-lived Service Account credentials into a pod. Modern Kubernetes obtains these credentials through the TokenRequest API rather than automatically creating long-term token Secrets. section 3.3

Pods commonly receive the default Service Account at /var/run/secrets/kubernetes.io/serviceaccount, allowing applications to authenticate to the Kubernetes API. section 3.3

Verify the mounted credential

Run kubectl get po nginx -o yaml | grep volumeMounts -A14 to inspect the mount, then use kubectl exec -it nginx -- sh and cat /var/run/secrets/kubernetes.io/serviceaccount/token to view the token.

How Acing the Certified Kubernetes Administrator Exam, Second Edition covers it

How deep it goes
Explains credential delivery, mount paths, token inspection, and disabling automount, but not projected-volume configuration internals.
Examples
Uses nginx pod YAML, kubectl exec, and token output to verify the mounted credential.
What it assumes
Assumes familiarity with pods and kubectl while establishing Service Accounts and API authentication through concrete commands.
What you can do after
Operate projected credentials through kubectl inspection and verify whether a pod receives its Service Account token.
How it connects
Connects Service Accounts, the TokenRequest API, Secrets, and Kubernetes API authentication.

Also explained in

Compare how 2 books explain projected volume →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Certified Kubernetes Administrator Exam, Second Edition. The section links point to the parts of the book it draws on.