View details here: https://gist.github.com/xynova/87beae35688476efb2ee290d3926f5bb
From a Powershell session:
ubuntu
# ubuntu@windows10:~$
Install some utilities
sudo apt-get update -y && sudo apt-get install -y \
bash-completion \
nmap \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
References:
Download the latest release with the command:
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
Make the kubectl
binary executable and move it into the utilities path::
chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl
Add the completion script to the /etc/bash_completion.d
directory.
kubectl completion bash | sudo tee /etc/bash_completion.d/kubectl > /dev/null
Force the creation of a temporary .kube
config directory
kubectl config set-cluster fake --server=https://5.6.7.8 --insecure-skip-tls-verify
kubectl config set-credentials nobody
kubectl config set-context fake --cluster=fake --namespace=default --user=nobody
References:
- https://helm.sh/docs/using_helm/#from-script
- https://github.com/helm/helm/blob/master/docs/helm/helm_completion.md
- https://github.com/sagansystems/helm-github.git
- https://github.com/rimusz/helm-tiller
- https://github.com/maorfr/helm-restore
Install helm
curl -LO https://git.io/get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh
Add the completion script to the /etc/bash_completion.d
directory.
helm completion bash | sudo tee /etc/bash_completion.d/helm > /dev/null
Install helm plugins: helm-github, helm-tiller, helm-restore
helm init --client-only
helm plugin install https://github.com/sagansystems/helm-github.git
helm plugin install https://github.com/rimusz/helm-tiller
helm plugin install https://github.com/maorfr/helm-restore
References:
Get the kubectx
script
curl -O https://raw.githubusercontent.com/ahmetb/kubectx/master/kubectx \
&& chmod +x kubectx \
&& sudo mv kubectx /usr/local/bin/
Get the kubens
script
curl -O https://raw.githubusercontent.com/ahmetb/kubectx/master/kubens \
&& chmod +x kubens \
&& sudo mv kubens /usr/local/bin/
Add the completion script to the /etc/bash_completion.d
directory.
BASE_URL=https://raw.githubusercontent.com/ahmetb/kubectx/master/completion
curl ${BASE_URL}/kubectx.bash | sudo tee /etc/bash_completion.d/kubectx > /dev/null
curl ${BASE_URL}/kubens.bash | sudo tee /etc/bash_completion.d/kubens > /dev/null
References:
Remove older versions of Docker
sudo apt-get remove docker docker-engine docker.io containerd runc
Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
Add Docker's stable repository
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
Install Docker cli
sudo apt-get update -y && sudo apt-get install docker-ce-cli
Update pip, install it if not present
pip --version || sudo apt-get install python-pip
Install Docker Compose
pip install --user docker-compose
Add the completion script to the /etc/bash_completion.d
directory.
curl https://raw.githubusercontent.com/docker/compose/1.24.0/contrib/completion/bash/docker-compose \
| sudo tee /etc/bash_completion.d/docker-compose > /dev/null
View details here: https://gist.github.com/xynova/7d18ccb44eb52a38b5b51c0922e06cc7