liveBook · Manning

Private key

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

A private key is the secret cryptographic key used by an identity to prove possession of a public-key credential.

A private key is the secret half of a public-key credential. Keep it with the identity that uses it to authenticate; do not expose it in a certificate signing request or kubeconfig. section 3.2

Generate and use a private key for a Kubernetes user:

  • Generate Carol’s 2,048-bit key with `openssl genrsa -out carol.key 2048`. section 3.2
  • Use the key to create a certificate signing request, identifying the user and group through the certificate subject. section 3.2
  • Pair the issued client certificate with the private key in a kubeconfig, then verify access through the user’s context. section 3.2

Operational check

After switching to Carol’s context, `kubectl get po` succeeds while deleting a pod returns `Forbidden`; the credential authenticates, and RBAC controls authorization. section 3.2

root@kind-control-plane:/# openssl genrsa -out carol.key 2048
<no output>

Inspect the concise command output for private-key generation. section 3.2

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

How deep it goes
Shows key generation, CSR creation, certificate issuance, kubeconfig pairing, and access verification without explaining cryptographic internals.
Examples
Uses Carol’s `carol.key`, CSR, issued certificate, kubeconfig context, and forbidden pod-deletion attempt.
What it assumes
Assumes familiarity with Kubernetes certificate authorities, certificate signing requests, kubeconfig contexts, and role bindings.
What you can do after
Operate/configure a Kubernetes user credential by generating a key and pairing it with an issued client certificate.
How it connects
Connects private keys with public-key credentials, certificate signing requests, client certificates, kubeconfig, and RBAC.

Also explained in

Compare how 13 books explain private key →

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.