Last active
February 27, 2018 06:52
-
-
Save halkeye/352d742d78c97f6fa73188a2e26094ca to your computer and use it in GitHub Desktop.
Simple script to install external-storage to typhoon
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
set -x | |
set -e | |
export KUBECONFIG=$HOME/.secrets/clusters/nemo/auth/kubeconfig | |
test -f external-storage || git clone git@github.com:kubernetes-incubator/external-storage.git | |
cat external-storage/digitalocean/manifests/digitalocean-secret.yaml | perl -pi -e "s{<DigitalOcean token>}{$(python -c "import base64; print base64.b64encode(open('$HOME/.config/digital-ocean/token', 'r').read().strip().replace('\n', ''))")}" | kubectl create -f - | |
kubectl create -f external-storage/digitalocean/manifests/rbac | |
cat external-storage/digitalocean/manifests/digitalocean-provisioner.yaml | perl -pi -e 's{apps/v1beta2}{apps/v1}' | kubectl create -f - | |
cat external-storage/digitalocean/manifests/digitalocean-flexplugin-deploy.yaml | perl -pi -e "s{apps/v1beta2}{apps/v1};s{<flex volume plugin dir, default: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/>}{/var/lib/kubelet/volumeplugins/}" | kubectl create -f - | |
cat external-storage/digitalocean/manifests/sc.yaml | perl -pi -e "s{<digitalocean zone: ex fra1>}{tor1}" | kubectl create -f - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment