Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fonsecas72/c822f5c7b65f0acfe2b6b837b3a8f515 to your computer and use it in GitHub Desktop.
Save fonsecas72/c822f5c7b65f0acfe2b6b837b3a8f515 to your computer and use it in GitHub Desktop.
How to check a cert secrt in k8s
kubectl get secret some-cert -o json | jq -r '.data."tls.crt" | @base64d ' | openssl x509 -text -noout
@fonsecas72
Copy link
Author

kubectl get secret some-cert -o "jsonpath={.data['tls\.crt']}" | base64 -D | openssl x509 -startdate -enddate -noout

@fonsecas72
Copy link
Author

base64 -d
if on linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment