Skip to content

Instantly share code, notes, and snippets.

@ryran
Created June 20, 2019 14:48
Show Gist options
  • Save ryran/d7507f5f9a24bb932e7b0f85843f95cf to your computer and use it in GitHub Desktop.
Save ryran/d7507f5f9a24bb932e7b0f85843f95cf to your computer and use it in GitHub Desktop.
OCPv4: check expiration of node kubelet server/client certs
#!/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