Last active
December 26, 2019 17:29
-
-
Save nithu0115/5b0e800822d3e70fda4efc46bb09d763 to your computer and use it in GitHub Desktop.
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 -x | |
export C=extravagant-outfit-1571795722 | |
PAYLOAD=$(aws eks describe-cluster --name $C --query 'cluster.{CA: certificateAuthority.data,Endpoint: endpoint}' --region us-east-2) | |
echo $PAYLOAD | jq -rc .CA | base64 -d > /tmp/public_cert | |
ENDPOINT=$(echo $PAYLOAD | jq -rc .Endpoint) | |
curl -iv --cacert /tmp/public_cert -H "Authorization: Bearer "$(aws eks get-token --cluster-name $C | jq -rc .status.token) $ENDPOINT/api/v1/namespaces/default/pods/ | |
while [ $? -ne 0 ]; do | |
"command error" | |
sleep 10s | |
done | |
echo "Node Check Passed" | |
systemctl restart kubelet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment