Last active
December 20, 2020 10:09
-
-
Save jjo/78f60702fbfa1cbec7dd865f67a3728a to your computer and use it in GitHub Desktop.
Revisions
-
jjo revised this gist
Nov 27, 2017 . 1 changed file with 8 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -23,16 +23,18 @@ kubectl completion bash > /etc/bash_completion.d/kubectl.completion source /etc/bash_completion.d/kubectl.completion # helm HELM_VERSION=2.7.2 curl -LO https://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-linux-amd64.tar.gz tar -xvf helm-v${HELM_VERSION}-linux-amd64.tar.gz mv linux-amd64/helm /usr/local/bin/ helm init helm repo update # dev tools and latest GO GO_VERSION=1.9.2 yum -q -y install gcc gcc-go gcc-c++ make strace lsof > /dev/null curl -LO https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz ln -sf /usr/local/go/bin/go* /usr/local/bin/ @@ -48,4 +50,6 @@ kubeadm join --token $(kubeadm token list |sed -n 2p|egrep -o '^\S+') $(sed -rn # tmate ftW wget -q https://github.com/tmate-io/tmate/releases/download/2.2.1/tmate-2.2.1-static-linux-amd64.tar.gz && tar zxf tmate-*.tar.gz && ln -sf $PWD/tmate-*/tmate /usr/local/bin echo "* Connect to address about to be shown, then run : pkill -1 tmate" # ssh keys needed by tmate to start: ssh-keygen -t rsa -b 4096 -P "" -f "$HOME/.ssh/id_rsa" (script -qfc tmate |egrep -o "ssh \S+tmate.io") & -
jjo revised this gist
Nov 27, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -48,4 +48,4 @@ kubeadm join --token $(kubeadm token list |sed -n 2p|egrep -o '^\S+') $(sed -rn # tmate ftW wget -q https://github.com/tmate-io/tmate/releases/download/2.2.1/tmate-2.2.1-static-linux-amd64.tar.gz && tar zxf tmate-*.tar.gz && ln -sf $PWD/tmate-*/tmate /usr/local/bin echo "* Connect to address about to be shown, then run : pkill -1 tmate" (script -qfc tmate |egrep -o "ssh \S+tmate.io") & -
jjo revised this gist
Nov 27, 2017 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -23,16 +23,16 @@ kubectl completion bash > /etc/bash_completion.d/kubectl.completion source /etc/bash_completion.d/kubectl.completion # helm curl -LO https://storage.googleapis.com/kubernetes-helm/helm-v2.7.1-linux-amd64.tar.gz tar -xvf helm-v2.6.1-linux-amd64.tar.gz mv linux-amd64/helm /usr/local/bin/ helm init helm repo update # dev tools and latest GO yum -q -y install gcc gcc-go gcc-c++ make strace lsof > /dev/null curl -LO https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz ln -sf /usr/local/go/bin/go* /usr/local/bin/ -
jjo revised this gist
Oct 13, 2017 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -22,12 +22,20 @@ yum -q -y install bash-completion git-core tmux vim wget sudo which > /dev/null kubectl completion bash > /etc/bash_completion.d/kubectl.completion source /etc/bash_completion.d/kubectl.completion # helm curl -LO https://storage.googleapis.com/kubernetes-helm/helm-v2.6.1-linux-amd64.tar.gz tar -xvf helm-v2.6.1-linux-amd64.tar.gz mv linux-amd64/helm /usr/local/bin/ helm init helm repo update # dev tools and latest GO yum -q -y install gcc gcc-go gcc-c++ make strace lsof > /dev/null curl -LO https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz tar -C /usr/local -xzf go1.8.linux-amd64.tar.gz ln -sf /usr/local/go/bin/go* /usr/local/bin/ # jjo'isms git clone http://github.com/jjo/config; rsync -a config/ ~/ && rm -rf config/ git clone http://github.com/jjo/bin -
jjo revised this gist
Oct 2, 2017 . No changes.There are no files selected for viewing
-
jjo revised this gist
Sep 29, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -40,4 +40,4 @@ kubeadm join --token $(kubeadm token list |sed -n 2p|egrep -o '^\S+') $(sed -rn # tmate ftW wget -q https://github.com/tmate-io/tmate/releases/download/2.2.1/tmate-2.2.1-static-linux-amd64.tar.gz && tar zxf tmate-*.tar.gz && ln -sf $PWD/tmate-*/tmate /usr/local/bin echo "* Connect to address about to be shown, then run : pkill -1 tmate" script -qfc tmate |egrep -o "ssh \S+tmate.io" -
jjo revised this gist
Sep 28, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,7 @@ # bash -x <( curl -L bit.do/jjo-pwk-sh ) # # https://gist.github.com/jjo/78f60702fbfa1cbec7dd865f67a3728a/edit # http://bit.do/admin/edit/jjo-pwk-sh # # Initialize cluster and FIXUP some play-with-k8s annoyances -
jjo revised this gist
Sep 28, 2017 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,9 +4,11 @@ # # bash -x <( curl -L bit.do/jjo-pwk-sh ) # # https://gist.github.com/jjo/78f60702fbfa1cbec7dd865f67a3728a/edit # # Initialize cluster and FIXUP some play-with-k8s annoyances test -d /etc/kubernetes/pki || ( kubeadm init --apiserver-advertise-address $(hostname -i) | tee ~/kubeadm-init.log kubectl apply -n kube-system -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 -w0)" curl -L -s https://git.io/kube-dashboard | sed 's/targetPort: 9090/targetPort: 9090\n type: LoadBalancer/' | kubectl apply -f - @@ -21,9 +23,9 @@ source /etc/bash_completion.d/kubectl.completion # dev tools and latest GO yum -q -y install gcc gcc-go gcc-c++ make strace lsof > /dev/null curl -LO https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz tar -C /usr/local -xzf go1.8.linux-amd64.tar.gz ln -sf /usr/local/go/bin/go* /usr/local/bin/ # jjo'isms git clone http://github.com/jjo/config; rsync -a config/ ~/ && rm -rf config/ @@ -32,6 +34,7 @@ git clone http://github.com/jjo/bin # show kubeadm join ... echo "* Join nodes with:" grep -o "kubeadm.*join.*" ~/kubeadm-init.log kubeadm join --token $(kubeadm token list |sed -n 2p|egrep -o '^\S+') $(sed -rn s,.*server:.*//,,p /etc/kubernetes/admin.conf) # tmate ftW wget -q https://github.com/tmate-io/tmate/releases/download/2.2.1/tmate-2.2.1-static-linux-amd64.tar.gz && tar zxf tmate-*.tar.gz && ln -sf $PWD/tmate-*/tmate /usr/local/bin -
jjo revised this gist
Aug 17, 2017 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,9 @@ #!/bin/bash -x ## Setup http://labs.play-with-k8s.com/ env ala' jjo # YEAH I TRUST RUNNING STUFF DIRECTLY AS ROOT way -> # # bash -x <( curl -L bit.do/jjo-pwk-sh ) # # Initialize cluster and FIXUP some play-with-k8s annoyances test -f ~/kubeadm-init.log || ( @@ -13,14 +15,14 @@ kubectl get deployment --namespace=kube-system kube-dns -oyaml|sed -r 's,(.*--se # k8s comfy'ness cd yum -q -y install bash-completion git-core tmux vim wget sudo which > /dev/null kubectl completion bash > /etc/bash_completion.d/kubectl.completion source /etc/bash_completion.d/kubectl.completion # dev tools and latest GO yum -q -y install gcc gcc-go gcc-c++ make strace lsof > /dev/null curl -LO https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz tar -C /usr/local -xzf go1.8.linux-amd64.tar.gz ln -sf /usr/local/go/bin/go /usr/local/bin/go # jjo'isms @@ -35,4 +37,3 @@ grep -o "kubeadm.*join.*" ~/kubeadm-init.log wget -q https://github.com/tmate-io/tmate/releases/download/2.2.1/tmate-2.2.1-static-linux-amd64.tar.gz && tar zxf tmate-*.tar.gz && ln -sf $PWD/tmate-*/tmate /usr/local/bin echo "* Connect to address about to be shown, then run : pkill -1 tmate" script -qfc tmate |egrep -o ssh.session:.* -
jjo revised this gist
Aug 17, 2017 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,25 +13,26 @@ kubectl get deployment --namespace=kube-system kube-dns -oyaml|sed -r 's,(.*--se # k8s comfy'ness cd yum -qy install bash-completion git-core tmux vim wget sudo which > /dev/null kubectl completion bash > /etc/bash_completion.d/kubectl.completion source /etc/bash_completion.d/kubectl.completion # dev tools and latest GO yum -qy install gcc gcc-go gcc-c++ make strace lsof > /dev/null curl -LO https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz tar -C /usr/local -xvzf go1.8.linux-amd64.tar.gz ln -sf /usr/local/go/bin/go /usr/local/bin/go # jjo'isms git clone http://github.com/jjo/config; rsync -a config/ ~/ && rm -rf config/ git clone http://github.com/jjo/bin # show kubeadm join ... echo "* Join nodes with:" grep -o "kubeadm.*join.*" ~/kubeadm-init.log # tmate ftW wget -q https://github.com/tmate-io/tmate/releases/download/2.2.1/tmate-2.2.1-static-linux-amd64.tar.gz && tar zxf tmate-*.tar.gz && ln -sf $PWD/tmate-*/tmate /usr/local/bin echo "* Connect to address about to be shown, then run : pkill -1 tmate" script -qfc tmate |egrep -o ssh.session:.* -
jjo revised this gist
Aug 17, 2017 . 1 changed file with 7 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,9 +3,9 @@ # ## Setup http://labs.play-with-k8s.com/ env ala' jjo # Initialize cluster and FIXUP some play-with-k8s annoyances test -f ~/kubeadm-init.log || ( kubeadm init --apiserver-advertise-address $(hostname -i) | tee ~/kubeadm-init.log kubectl apply -n kube-system -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 -w0)" curl -L -s https://git.io/kube-dashboard | sed 's/targetPort: 9090/targetPort: 9090\n type: LoadBalancer/' | kubectl apply -f - kubectl get deployment --namespace=kube-system kube-dns -oyaml|sed -r 's,(.*--server)=(/ip6.arpa/.*),&\n\1=8.8.8.8,'|kubectl apply -f - @@ -27,12 +27,11 @@ ln -sf /usr/local/go/bin/go /usr/local/bin/go git clone http://github.com/jjo/config; rsync -a config/ ~/ && rm -rf config git clone http://github.com/jjo/bin # show kubeadm join ... echo "* Join nodes with:" grep -o "kubeadm.*join.*" ~/kubeadm-init.log # tmate ftW wget https://github.com/tmate-io/tmate/releases/download/2.2.1/tmate-2.2.1-static-linux-amd64.tar.gz && tar zxf tmate-*.tar.gz && ln -sf $PWD/tmate-*/tmate /usr/local/bin echo "* Connect to address about to be shown, then run : pkill -1 tmate" script -qfc tmate |egrep -o ssh.session:.* -
jjo revised this gist
Aug 16, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/bash -x # bash -x <( curl -L bit.do/jjo-pwk-sh ) # ## Setup http://labs.play-with-k8s.com/ env ala' jjo -
jjo revised this gist
Aug 16, 2017 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -27,12 +27,12 @@ ln -sf /usr/local/go/bin/go /usr/local/bin/go git clone http://github.com/jjo/config; rsync -a config/ ~/ && rm -rf config git clone http://github.com/jjo/bin # re-echo the node join CLI echo "kubeadm join --token=$(kubeadm token list|sed -nr '/bootstrap/s/ .+//p') $(hostname -i)" # tmate ftW wget https://github.com/tmate-io/tmate/releases/download/2.2.1/tmate-2.2.1-static-linux-amd64.tar.gz && tar zxf tmate-*.tar.gz && ln -sf $PWD/tmate-*/tmate /usr/local/bin echo "Connect to address about to be shown, then:" echo "pkill -1 tmate" script -qfc tmate |egrep -o ssh.session:.* -
jjo revised this gist
Aug 16, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ #!/bin/bash -x # curl -L bit.do/jjo-pwk-sh | bash -x # ## Setup http://labs.play-with-k8s.com/ env ala' jjo # FIXUP some play-with-k8s annoyances -
jjo revised this gist
Aug 16, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -33,4 +33,4 @@ script -qfc tmate |egrep -o ssh.session:.* & echo "Connect to address about to be shown, then:" echo "pkill -1 tmate" echo "kubeadm join --token=$(kubeadm token list|sed -nr '/bootstrap/s/ .+//p') $(hostname -i)" -
jjo revised this gist
Aug 16, 2017 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,14 +2,16 @@ ## Setup http://labs.play-with-k8s.com/ env ala' jjo # FIXUP some play-with-k8s annoyances kubectl cluster-info || ( kubeadm init --apiserver-advertise-address $(hostname -i) kubectl apply -n kube-system -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 -w0)" curl -L -s https://git.io/kube-dashboard | sed 's/targetPort: 9090/targetPort: 9090\n type: LoadBalancer/' | kubectl apply -f - kubectl get deployment --namespace=kube-system kube-dns -oyaml|sed -r 's,(.*--server)=(/ip6.arpa/.*),&\n\1=8.8.8.8,'|kubectl apply -f - ) # k8s comfy'ness cd yum install -y bash-completion git-core tmux vim wget sudo which >& yum-0.log kubectl completion bash > /etc/bash_completion.d/kubectl.completion source /etc/bash_completion.d/kubectl.completion @@ -30,3 +32,5 @@ script -qfc tmate |egrep -o ssh.session:.* & ## connect, then release browser "terminal" with: echo "Connect to address about to be shown, then:" echo "pkill -1 tmate" echo "kubeadm join --token=$(kubeadm token list|sed -nr '/bootstrap/s/ .+//p') $(hostname -i)" -
jjo created this gist
Aug 16, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ #!/bin/bash -x ## Setup http://labs.play-with-k8s.com/ env ala' jjo # FIXUP some play-with-k8s annoyances kubeadm init --apiserver-advertise-address $(hostname -i) kubectl apply -n kube-system -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 -w0)" curl -L -s https://git.io/kube-dashboard | sed 's/targetPort: 9090/targetPort: 9090\n type: LoadBalancer/' | kubectl apply -f - kubectl get deployment --namespace=kube-system kube-dns -oyaml|sed -r 's,(.*--server)=(/ip6.arpa/.*),&\n\1=8.8.8.8,'|kubectl apply -f - # k8s comfy'ness cd yum install -y bash-completion git-core tmux vim wget sudo which kubectl completion bash > /etc/bash_completion.d/kubectl.completion source /etc/bash_completion.d/kubectl.completion # dev tools and latest GO yum -y install gcc gcc-go gcc-c++ make strace lsof curl -LO https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz tar -C /usr/local -xvzf go1.8.linux-amd64.tar.gz ln -sf /usr/local/go/bin/go /usr/local/bin/go # jjo'isms git clone http://github.com/jjo/config; rsync -a config/ ~/ && rm -rf config git clone http://github.com/jjo/bin # tmate ftW wget https://github.com/tmate-io/tmate/releases/download/2.2.1/tmate-2.2.1-static-linux-amd64.tar.gz && tar zxf tmate-*.tar.gz && ln -sf $PWD/tmate-*/tmate /usr/local/bin exec bash script -qfc tmate |egrep -o ssh.session:.* & ## connect, then release browser "terminal" with: echo "Connect to address about to be shown, then:" echo "pkill -1 tmate"