Skip to content

Instantly share code, notes, and snippets.

@cxhercules
Created December 29, 2018 06:17
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 cxhercules/6e629a6d68bfebf3815a829334d50959 to your computer and use it in GitHub Desktop.
Save cxhercules/6e629a6d68bfebf3815a829334d50959 to your computer and use it in GitHub Desktop.
openssl x509 -in /etc/kubernetes/pki/ca.crt -noout -pubkey | openssl rsa -pubin -outform DER 2>/dev/null | sha256sum | cut -d' ' -f1
Reference:
https://github.com/kubernetes/kubeadm/issues/659#issuecomment-392822587
@cxhercules
Copy link
Author

Above will get the sha256sum for public cert used in kubeadm join command if you ever forget it and have an active token you want to use.

Goes with following argument:
--discovery-token-ca-cert-hash

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