Created
May 10, 2018 04:28
-
-
Save hh/e563a556d6c89591e404e6305dedae14 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
set -x | |
set -e | |
MASTER_NODE=$(gcloud compute instances list | grep master | awk '{print $1}') | |
if echo $1 | grep / ; then | |
REPO=$(echo $1 | awk -F/ '{print $1}') | |
KAPP=$(echo $1 | awk -F/ '{print $2}') | |
fi | |
kubectl create ns $KAPP | |
helm install $REPO/$KAPP \ | |
--name $KAPP \ | |
--namespace $KAPP \ | |
--set serviceAccount.name=$KAPP \ | |
--set serviceAccount.create=true \ | |
--set rbac.create=true | |
# --set alertmanager.persistentVolume.storageClass=gp2 \ | |
# --set server.persistentVolume.storageClass=gp2 \ | |
# check the healthchecks and status of objects created | |
# for now get a cup of tea | |
# see if it does what is says on the box | |
echo After your done, control-c then run: | |
echo helm delete --purge $KAPP | |
gcloud compute ssh $MASTER_NODE --command "sudo docker exec \$(sudo docker ps -a | grep kube-apiserver-amd64 | awk '{print \$1}') tail -f /var/log/kubernetes/audit/audit.log" | tee ${KAPP}-audit.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment