keypair rotation - export new credentials between promote and distruts

This commit is contained in:
Peter Rifel 2021-07-20 23:46:42 -04:00
parent 39b91c2ec8
commit 5eace61cc5
No known key found for this signature in database
GPG Key ID: BC6469E5B16DB2B6
1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,11 @@ ${KOPS} promote keypair all
${KOPS} update cluster --yes
${KOPS} rolling-update cluster --yes --validate-count=10
KUBECFG_PROMOTE=$(mktemp -t kubeconfig.XXXXXXXXX)
${KOPS} export kubecfg --admin --kubeconfig="${KUBECFG_PROMOTE}"
kubectl --kubeconfig="${KUBECFG_PROMOTE}" config view > "${REPORT_DIR}/promote.kubeconfig"
export KUBECONFIG="${KUBECFG_PROMOTE}"
${KOPS} validate cluster --wait=10m --count=3
${KOPS} distrust keypair all