Created
June 20, 2019 14:48
-
-
Save ryran/d7507f5f9a24bb932e7b0f85843f95cf to your computer and use it in GitHub Desktop.
OCPv4: check expiration of node kubelet server/client certs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MASTERS="master0 master1 master2" | |
WORKERS="worker0 worker1" | |
echo "Checking expiration dates for all node /var/lib/kubelet/pki/kubelet-{server,client}-current certs ..." >&2 | |
echo >&2 | |
for h in $MASTERS $WORKERS; do | |
echo $h | |
ssh $h 'for f in kubelet-{server,client}-current.pem; do printf "\t$f: "; sudo openssl x509 -enddate -noout -in /var/lib/kubelet/pki/$f; done' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment