LAB02c: Create a New Kubernetes User Using Certificate Authentication
Goal
PREREQUISITES
Important files needed:
/etc/kubernetes/pki/ca.crt
/etc/kubernetes/pki/ca.keySTEP 1 — Create a private key for the new user
STEP 2 — Create a CSR (Certificate Signing Request)
STEP 3 — Sign the CSR with Kubernetes CA
STEP 4 — Create a new kubeconfig for the new user
1. Get the cluster name
2. Get the server endpoint
3. Get the CA certificate
STEP 5 — Build a kubeconfig file manually
STEP 6 — Test the kubeconfig without RBAC
STEP 7 — Grant RBAC Permissions
OPTION A — Namespace limited access (e.g., default namespace)
OPTION B — Cluster-wide read-only
OPTION C — Full admin access (NOT recommended)
STEP 8 — Test Access as john
STEP 9 — Validate Identity (VERY IMPORTANT)
STEP 10 — Inspect the certificate details
FINAL OUTPUTS OF THIS LAB
Summary
PreviousLAB02b: Deep Dive into Kubeconfig, Client Certificate & Server CertificateNextLAB02d: Setting up Kubeconfig
Last updated