liveBook · Manning

Authentication

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

Authentication is the process of verifying the identity of a user, workload, or system making a request.

Authentication verifies the identity of a user, workload, or system before the Kubernetes API evaluates authorization. Human kubectl requests commonly use signed X.509 client certificates stored in kubeconfig files; pods commonly use Service Account tokens. section 3.1

Kubernetes supports several authentication paths and identity types:

  • Use X.509 certificate authentication to identify users through a signed client certificate and Kubernetes certificate authority. section 3.1
  • Use Service Accounts and associated tokens for machine-to-machine requests from pods. section 3.1
  • Configure or encounter bearer tokens, OpenID Connect, and webhooks as additional API-server authentication mechanisms; one successful method is sufficient. section 3.1
  • Treat authentication as distinct from RBAC authorization: authentication establishes identity, while roles and bindings restrict permitted API actions. section 3.1 section 9.3.2

User and pod access

A kubectl request presents a client certificate from kubeconfig so the API server can map the requester to a username. A pod instead accesses the API with its mounted Service Account identity and token. Verify available Service Accounts with `kubectl get sa`; the default account appears in the namespace listing. section 3.1

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

How deep it goes
Explains certificate, token, and external-provider mechanisms, emphasizing X.509 users and Service Account tokens for pods.
Examples
Uses kubectl client certificates, kubeconfig, Service Account tokens, `kubectl get sa`, and certificate-token access diagrams.
What it assumes
Assumes familiarity with kubectl and the Kubernetes API while distinguishing user authentication from Service Account authentication.
What you can do after
Operate/configure Kubernetes API access with user certificates and Service Accounts, then relate authenticated identities to RBAC permissions.
How it connects
Connects Kubernetes API authentication with RBAC, kubeconfig, X.509 certificates, Service Accounts, bearer tokens, OpenID Connect, and webhooks.

Also explained in

Compare how 34 books explain authentication →

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.