bookmark_borderMinikube

minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes.

All you need is Docker (or similarly compatible) container or a Virtual Machine environment, and Kubernetes is a single command away: minikube start

What you’ll need

Before installing Minikube, you need docker(or VM) and Kubectl

Install Docker

Install and Set up kubectl

1. 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"

2. Make the kubectl binary executable.

chmod +x ./kubectl

3. Move the binary in to your PATH.

sudo mv ./kubectl /usr/local/bin/kubectl

4. Test to ensure the version you installed is up-to-date:

kubectl version --client

Install Minikube

If the Brew Package Manager installed:

brew install minikube

If which minikube fails after installation via brew, you may have to remove the minikube cask and link the binary:

brew cask remove minikube
brew link minikube

Otherwise, download minikube directly:

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64
sudo install minikube-darwin-amd64 /usr/local/bin/minikube

If the Chocolatey Package Manager is installed, use it to install minikube:

choco install minikube

Otherwise, download and run the Windows installer

Binary download

sudo apt install curl
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 
sudo install minikube-linux-amd64 /usr/local/bin/minikube

Add a new user (username= developer) in Unbuntu

sudo su
adduser developer
usermode -aG sudo developer
su - developer

Add the user to the Docker Group

sudo groupadd docker
sudo usermod -aG docker developer

Start minikube with Docker

minikube start --driver=docker

If you successfully install minikube on your machine, check minikube status and node.

minikube status
# minikube
# type: Control Plane
# host: Running
# kubelet: Running
# apiserver: Running
# kubeconfig: Configured
kubectl cluster-info
# Kubernetes master is running at https://192.168.49.2:8443
# KubeDNS is running at https://192.168.49.2:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
kubectl get nodes
# NAME       STATUS   ROLES    AGE   VERSION
# minikube   Ready    master   26m   v1.19.2

kubectl get nodes -o wide
# NAME       STATUS   ROLES    AGE   VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE           KERNEL-VERSION       CONTAINER-RUNTIME
# minikube   Ready    master   28m   v1.19.2   192.168.49.2   <none>        Ubuntu 20.04 LTS   4.15.0-122-generic   docker://19.3.8
  • single-node Kubernetes cluster and the name is minikube

https://minikube.sigs.k8s.io/docs/

ANOTE.DEV