Created
August 1, 2017 08:22
-
-
Save onuralp/a7b67f84e03d2d0cbb7ca5a16161fefc to your computer and use it in GitHub Desktop.
This script installs kubectl kubectx and helm to you ubuntu. I usually use docker to connect kubectl. But I created this for some reason. Enjoy
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
# update | |
sudo apt-get update | |
sudo apt-get -qq update | |
# Install kubectl | |
sudo curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl | |
sudo chmod +x ./kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
# Install kubectx (Switch between Kubernetes contexts/namespaces) | |
sudo curl -sSL http://github.com/ahmetb/kubectx/archive/v0.3.1.tar.gz | tar -C /usr/local/ -xz | |
export PATH=/usr/local/kubectx-0.3.1:$PATH | |
# Install Helm (The Kubernetes Package Manager) | |
curl -Lo /tmp/helm-linux-amd64.tar.gz https://kubernetes-helm.storage.googleapis.com/helm-v2.1.3-linux-amd64.tar.gz | |
tar -xvf /tmp/helm-linux-amd64.tar.gz -C /tmp/ | |
chmod +x /tmp/linux-amd64/helm && sudo mv /tmp/linux-amd64/helm /usr/local/bin/ | |
# Add your kubeconfig | |
# sudo vim /home/ubuntu/.kube/config | |
# Configure dns if necessary | |
# sudo vim /etc/resolv.conf | |
# add top of the file | |
# nameserver <your dns server ip> | |
# Initialize helm | |
helm init | |
helm repo update | |
helm ls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment