LAB02b: Deep Dive into Kubeconfig, Client Certificate & Server Certificate
LAB OBJECTIVE
✔ Where kubeconfig files are stored
✔ How to view kubeconfig structure
✔ How to extract client cert & private key
✔ How to decode the client certificate
✔ How to check Kubernetes API server certificate
✔ How to find Subject, Issuer, SAN
✔ How Kubernetes verifies TLS connections
LAB 1 — Locate and View Kubeconfig
Step 1: Check where kubectl is reading kubeconfig from
Step 2: Show path
Step 3: View cluster info in kubeconfig
LAB 2 — View the Entire Kubeconfig File
LAB 3 — Extract the Client Certificate from kubeconfig
Step 1: Extract client certificate
Step 2: Extract client private key
LAB 4 — Decode Client Certificate and Inspect Identity
Step 1: View certificate info
Output will show:
Expected Example:
Meaning:
LAB 5 — Verify Client Key Matches the Certificate
LAB 6 — Extract the Kubernetes Cluster CA Certificate
LAB 7 — Check Kubernetes API Server Certificate (Server Cert)
View full certificate:
✔ Subject CN
✔ SAN (Subject Alternative Names)
LAB 8 — Compare Client → Server → CA trust chain
Check if server certificate is signed by CA:
LAB 9 — Verify kubectl Connectivity using TLS Debug Mode
LAB 10 — Check Who You Are Inside the Cluster
LAB 11 — Check RBAC Permissions Based on Certificate Identity
BONUS LAB — Export kubeconfig for Lens
PreviousBLOG02d: KUBECONFIG Detailed BreakdownNextLAB02c: Create a New Kubernetes User Using Certificate Authentication
Last updated