Skip to content

Instantly share code, notes, and snippets.

@musfirotus
Last active September 22, 2020 07:29
Show Gist options
  • Save musfirotus/e1f1b9628d373482529baf7219f90005 to your computer and use it in GitHub Desktop.
Save musfirotus/e1f1b9628d373482529baf7219f90005 to your computer and use it in GitHub Desktop.
Instalasi Minikube, Kubectl, and Docker in linux

Kubectl dan Minikube

Instalasi dan Konfigurasi Kubectl


Download

Dengan curl on Linux

  • Download the latest version
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.19.0/bin/linux/amd64/kubectl
  • Supaya kubectl executable
chmod +x ./kubectl
  • Pindah binary ke direktori lokal
sudo mv ./kubectl /usr/local/bin/kubectl
  • Cek versi instalasi
kubectl version --client

Menggunakan native package management

sudo apt-get update && sudo apt-get install -y apt-transport-https gnupg2
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl

Menggunakan package management yg lain

snap install kubectl --classic

kubectl version --client

Cek Keberhasilan Instalasi

kubectl cluster-info

atau

kubectl cluster-info dump

Kalau belum bisa, mungkin dockernya belum jalan :v

Instalasi Minikube


Cek apakah linux support virtualization

grep -E --color 'vmx|svm' /proc/cpuinfo

Install Hypervisor

Bisa memakai docker kalau di linux set

--drive=none

Download

Direct Download dari Standalone Binary

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
  && chmod +x minikube

Supaya executable dari manapun

sudo mkdir -p /usr/local/bin/
sudo install minikube /usr/local/bin/

Menggunakan HomeBrew

brew install minikube

Cek Keberhasilan Instalasi

  • Start minikube
minikube start --driver=<driver_name>

Kalau kubernetes belum terinstall, maka akan diproses auto download.

  • Stop minikube
minikube stop
  • Cek status minikube
minikube status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment