Tuesday, November 5, 2024

k8sCertsFlatify: Script to dump TLS certificates in Kubernetes to flat files.

A script which extracts 1 or multiple tls/ssl certificates from a kubernetes cluster to PWD.
NOTE: Will not check the TLS certificate of the connecting kubernetes cluster as of the current time.
Switch --kubeconfig/-c <kubernetes kubeconfig file>. If not present default to ~/.kube/config
switch --namespaces/-n -- Namespace to dump certificates in. If not present, will dump certificates of all namespaces.
--context/-k -- The context to use in the kubeconfig file.
--dumpdir/-d -- Dump certificates to this directory instead of PWD
Will dump certificates in PWD in a directory with the name as the DNS to which the certificate belongs.

Install the Ruby gem (gem install k8sCertsFlatify) or use the docker image detechno/k8scertsflatify

No comments:

Post a Comment