Difference between revisions of "Kubernetes: Install MiniKube"

From OnnoWiki
Jump to navigation Jump to search
 
Line 22: Line 22:
 
==Install Kind==
 
==Install Kind==
 
'''Optional'''
 
'''Optional'''
 
 
 
  sudo su
 
  sudo su
 
  cd /usr/local/stc
 
  cd /usr/local/stc

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


Referensi

Pranala Menarik