Skip to content

Instantly share code, notes, and snippets.

@atrakic
Forked from daxmc99/rioStart.sh
Created October 14, 2019 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atrakic/4cd5c27c5fd69e0f568076ebc01ff6ca to your computer and use it in GitHub Desktop.
Save atrakic/4cd5c27c5fd69e0f568076ebc01ff6ca to your computer and use it in GitHub Desktop.
rioStart.sh
#!/bin/bash
#set -x
#set -e
k3d delete --name='rio'
k3d create -n rio --image rancher/k3s:v0.8.1 --publish 80:80 --publish 443:443 --publish 9443:9443 --publish 9080:9080 &&
declare -i i; i=0
until k3d get-kubeconfig --name='rio'
do
if (( i > 20 )); then
break
fi
sleep 2
i+=1
done
KUBECONFIG=$(k3d get-kubeconfig --name='rio') kubectl apply -f scripts/rbac.yaml
echo "Please export IP_ADDRESSES=127.0.0.1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment