When Kubernetes security and TLS certificates collide, kubectl and openssl become the sharpest tools you own. kubectl lets you reach deep inside your cluster. openssl lets you inspect, verify, and debug certificates before they break production. Combined, they cut straight to the truth.
Why “kubectl openssl” matters
TLS and mTLS are everywhere in Kubernetes—API servers, ingress controllers, service-to-service communication. If a certificate expires or misconfigures, your pods will stop talking. You can pull the certs from the cluster with kubectl and check them instantly with openssl. No UI, no guessing, no delay.
Pulling a certificate from a secret
kubectl get secret my-tls-secret -o jsonpath='{.data.tls\.crt}' | base64 --decode > tls.crt
This gives you the raw certificate file. From here, openssl x509 -in tls.crt -noout -text shows the issuer, subject, and expiration date.
Inspecting a live service certificate