Difference between revisions of "Kubernetes: Install MiniKube"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | ==Introduction== | ||
− | + | Minikube adalah tool open source yang memungkinkan Anda untuk menyiapkan cluster Kubernetes node tunggal di mesin lokal Anda. Cluster dijalankan di dalam mesin virtual dan menyertakan Docker, sehingga Anda dapat menjalankan container di dalam node. | |
− | |||
− | Minikube | ||
− | + | ==Install VirtualBox== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
sudo apt-get update -y | sudo apt-get update -y | ||
sudo apt-get upgrade -y | sudo apt-get upgrade -y | ||
+ | sudo apt -y install curl apt-transport-https | ||
+ | sudo apt -y install virtualbox virtualbox-ext-pack | ||
− | + | ==Install Minikube== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Install | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | sudo su | ||
+ | cd /usr/local/src/ | ||
+ | rm minikube-linux-amd64* | ||
wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 | wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 | ||
− | |||
− | |||
− | |||
− | |||
sudo cp minikube-linux-amd64 /usr/local/bin/minikube | sudo cp minikube-linux-amd64 /usr/local/bin/minikube | ||
− | |||
− | |||
− | |||
− | |||
− | |||
sudo chmod 755 /usr/local/bin/minikube | sudo chmod 755 /usr/local/bin/minikube | ||
− | + | minikube version | |
− | |||
− | |||
− | |||
− | + | ==Install Kind== | |
− | + | '''Optional''' | |
+ | sudo su | ||
+ | cd /usr/local/stc | ||
+ | curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64 | ||
+ | chmod +x ./kind | ||
+ | mv ./kind /usr/local/bin/kind | ||
− | + | ==Install Kubectl== | |
− | |||
− | |||
− | |||
− | |||
+ | sudo su | ||
+ | apt update | ||
+ | apt -y install apt-transport-https gnupg2 curl | ||
+ | cd /usr/local/src | ||
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl | curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl | ||
− | |||
− | |||
− | |||
chmod +x ./kubectl | chmod +x ./kubectl | ||
− | |||
− | |||
sudo mv ./kubectl /usr/local/bin/kubectl | sudo mv ./kubectl /usr/local/bin/kubectl | ||
− | |||
− | |||
− | |||
kubectl version -o json | kubectl version -o json | ||
− | + | ==Operasikan Minikube== | |
− | |||
− | + | Sebagai USER BIASA, jalankan | |
minikube start | minikube start | ||
− | + | Dashboard bisa di akses di | |
− | + | Kubernetes di https://192.168.99.100:8443 | |
+ | KubeDNS di https://192.168.99.100:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy | ||
− | |||
− | |||
− | |||
kubectl config view | kubectl config view | ||
− | |||
− | |||
− | |||
− | |||
kubectl cluster-info | kubectl cluster-info | ||
− | |||
− | |||
− | |||
− | |||
kubectl get nodes | kubectl get nodes | ||
− | |||
− | |||
− | |||
− | |||
kubectl get pod | kubectl get pod | ||
− | + | ===Login ke Node=== | |
minikube ssh | minikube ssh | ||
− | |||
− | |||
− | |||
− | |||
exit | exit | ||
− | + | ===Manajemen Minikube=== | |
minikube stop | minikube stop | ||
− | |||
− | |||
− | |||
− | |||
minikube status | minikube status | ||
− | + | minikube delete (BAHAYA) | |
− | |||
− | |||
− | |||
− | minikube delete | ||
− | |||
− | |||
− | |||
minikube addons list | minikube addons list | ||
− | + | ===Minikube Dashboard=== | |
− | |||
− | |||
− | |||
− | |||
minikube dashboard | minikube dashboard | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
minikube dashboard --url | minikube dashboard --url | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Latest revision as of 06:46, 19 October 2020
Introduction
Minikube adalah tool open source yang memungkinkan Anda untuk menyiapkan cluster Kubernetes node tunggal di mesin lokal Anda. Cluster dijalankan di dalam mesin virtual dan menyertakan Docker, sehingga Anda dapat menjalankan container di dalam node.
Install VirtualBox
sudo apt-get update -y sudo apt-get upgrade -y sudo apt -y install curl apt-transport-https sudo apt -y install virtualbox virtualbox-ext-pack
Install Minikube
sudo su cd /usr/local/src/ rm minikube-linux-amd64* wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo cp minikube-linux-amd64 /usr/local/bin/minikube sudo chmod 755 /usr/local/bin/minikube minikube version
Install Kind
Optional
sudo su cd /usr/local/stc curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64 chmod +x ./kind mv ./kind /usr/local/bin/kind
Install Kubectl
sudo su apt update apt -y install apt-transport-https gnupg2 curl cd /usr/local/src curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x ./kubectl sudo mv ./kubectl /usr/local/bin/kubectl kubectl version -o json
Operasikan Minikube
Sebagai USER BIASA, jalankan
minikube start
Dashboard bisa di akses di
Kubernetes di https://192.168.99.100:8443 KubeDNS di https://192.168.99.100:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
kubectl config view kubectl cluster-info kubectl get nodes kubectl get pod
Login ke Node
minikube ssh exit
Manajemen Minikube
minikube stop minikube status minikube delete (BAHAYA) minikube addons list
Minikube Dashboard
minikube dashboard minikube dashboard --url