Created
April 17, 2018 15:21
-
-
Save joshisa/9763aacee33624061c424dbbb43e46e9 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 | |
CLUSTER_HOST="mycluster.icp" | |
USER=admin | |
PW=admin | |
ID=id-mycluster-account | |
echo -e "Resetting Helm client env ..." | |
echo -e "" | |
sudo rm -rf ~/.helm | |
sudo rm /usr/local/bin/helm | |
sudo curl -kLo /usr/local/bin/helm https://${CLUSTER_HOST}:8443/helm-api/cli/linux-amd64/helm | |
sudo chmod +x /usr/local/bin/helm | |
helm init --client-only | |
echo -e "" | |
echo -e "Let's now refresh our Helm --tls certs (*.pem)" | |
echo -e "" | |
bx pr login -a https://${CLUSTER_HOST}:8443 --skip-ssl-validation -u ${USER} -p ${PW} -c ${ID} | |
bx pr cluster-config $(bx pr clusters | awk 'FNR == 3 {print $1}') | |
echo -e "" | |
echo -e "Resetting Helm Tiller Server component ..." | |
echo -e "" | |
kubectl delete deploy tiller-deploy -n kube-system | |
kubectl apply --force --overwrite=true -f $(find /opt -name tiller.yaml) | |
sleep 23 | |
kubectl get deploy tiller-deploy -n kube-system | |
echo -e "" | |
echo -e "Nice. As a final step, let's make sure that our helm version --tls command works cleanly" | |
echo -e "" | |
helm version --tls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment