Last active
August 20, 2022 12:44
-
-
Save sontek/5b31111d56d30a48dca764fe72fd9b01 to your computer and use it in GitHub Desktop.
Zapier klustered setup script
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
mkdir bin/ | |
echo "export PATH=$HOME/bin/:$PATH" >> ~/.bashrc | |
echo "export CONTAINER_RUNTIME_ENDPOINT=unix:///var/run/containerd/containerd.sock" >> ~/.bashrc | |
echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bashrc | |
printf "Installing kubectl..." | |
curl --silent -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
chmod +x kubectl | |
mv ./kubectl ./bin/kubectl | |
printf "π₯\n" | |
printf "Installing jq..." | |
curl --silent -LO "https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64" | |
chmod +x jq-linux64 | |
mv ./jq-linux64 ./bin/jq | |
printf "π₯\n" | |
printf "Installing ectdctl..." | |
curl --silent -LO "https://github.com/etcd-io/etcd/releases/download/v3.5.2/etcd-v3.5.2-linux-amd64.tar.gz" | |
tar -xf etcd-v3.5.2-linux-amd64.tar.gz | |
chmod +x ./etcd-v3.5.2-linux-amd64/etcdctl | |
mv ./etcd-v3.5.2-linux-amd64/etcdctl ./bin/etcdctl | |
rm -rf ./etcd-v3.5.2-linux-amd64 etcd-v3.5.2-linux-amd64.tar.gz | |
echo "export ETCDCTL_API=3" >>~/.bashrc | |
echo "export ETCDCTL_CACERT=/etc/kubernetes/pki/etcd/ca.crt" >> ~/.bashrc | |
echo "export ETCDCTL_CERT=/etc/kubernetes/pki/etcd/healthcheck-client.crt" >> ~/.bashrc | |
echo "export ETCDCTL_KEY=/etc/kubernetes/pki/etcd/healthcheck-client.key" >> ~/.bashrc | |
printf "π₯\n" | |
printf "Installing helm..." | |
curl --silent -LO "https://get.helm.sh/helm-v3.8.1-linux-amd64.tar.gz" | |
tar -xf helm-v3.8.1-linux-amd64.tar.gz | |
chmod +x ./linux-amd64/helm | |
mv ./linux-amd64/helm ./bin/helm | |
rm -rf ./linux-amd64 helm-v3.8.1-linux-amd64.tar.gz | |
printf "π₯\n" | |
printf "Aliasing 'kubectl' to 'k'..." | |
echo "alias k='kubectl'" >> ~/.bashrc | |
printf "π₯\n" | |
printf "Setting up tab completion..." | |
apt-get install -y bash-completion &>/dev/null | |
echo 'source <(kubectl completion bash)' >> ~/.bashrc | |
echo "source <(helm completion bash)" >> ~/.bashrc | |
echo 'complete -F __start_kubectl k' >> ~/.bashrc | |
source ~/.bashrc | |
source /usr/share/bash-completion/bash_completion | |
printf "π₯Looking for policies...\n" | |
kubectl get cnp,ccnp,resourcequota,limitrange,netpol,validatingwebhookconfiguration,mutatingwebhookconfiguration | |
printf "π₯\n" | |
printf "\nβ β β β β β β β β β β β β β β β β β \nβ All done! Happy Hacking! β\nβ β β β β β β β β β β β β β β β β β \n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment