6.06 View TLS Certificate Details in Kubernetes
π― Scenario
You join a new team as a Kubernetes administrator.
You are told:
- There are certificate-related issues
- Some components are failing
- You must perform a full TLS health check
1οΈβ£ Identify Cluster Setup Method
Question
How was the cluster provisioned?
- Certificates typically in
/etc/kubernetes/pki/ - Control plane runs as static pods
- Configs in
/etc/kubernetes/manifests/
- Certificates manually generated
- Paths defined in systemd service files
- Certificate lifecycle mostly abstracted
Note
Always determine provisioning method before troubleshooting.
2οΈβ£ Locate Certificate Files
Example (kubeadm):
Look for flags:
Document:
- File path
- Purpose
- Issuer
- Expiry date
- SAN entries
3οΈβ£ View Certificate Details
Use OpenSSL:
π Sections to Inspect
Subject
Confirms component identity:
Issuer
Must match cluster CA.
Warning
Incorrect issuer indicates trust chain issue.
Validity
Danger
Expired certificates cause control plane outages.
Subject Alternative Name (SAN)
Failure
Missing SAN entries will break TLS validation.
4οΈβ£ Certificates to Audit
| Component | Certificate |
|---|---|
| CA | ca.crt |
| API Server | apiserver.crt |
| ETCD | etcd-server.crt |
| Kubelet (per node) | node01.crt |
| Admin | admin.crt |
| Scheduler | scheduler.crt |
| Controller Manager | controller-manager.crt |
| Kube Proxy | kube-proxy.crt |
5οΈβ£ Health Check Checklist
Success
- Not expired
- Correct CN
- Correct SAN entries
- Correct Issuer
- Proper permissions (600 for keys)
6οΈβ£ Troubleshooting Logs
If API Server is Running
If API Server is Down
Use container runtime:
7οΈβ£ Common Production Issues
| Issue | Impact |
|---|---|
| Expired CA | Entire cluster down |
| Expired API cert | kubectl fails |
| Missing SAN | API unreachable |
| Wrong CN | RBAC denied |
| Incorrect issuer | Trust failure |
8οΈβ£ Best Practices
β DO
Success
- Monitor certificate expiration
- Automate renewal (
kubeadm cert renew) - Backup CA securely
- Rotate certificates before expiry
- Audit regularly
β DON'T
Danger
- Do NOT ignore expiry warnings
- Do NOT commit private keys to Git
- Do NOT reuse admin certificates
- Do NOT modify certificates without restart plan
π Quick Expiry Check
π― Summary
- Identify cluster provisioning method
- Locate certificate files
- Decode using OpenSSL
- Validate CN, SAN, Issuer, Expiry
- Check logs if issues
- Plan proactive renewal
Quote
Regular certificate audits prevent unexpected control plane outages.