This is just a quick guide to install minikube and enable ingress controller on Ubuntu.
The purpose of this post is to consolidate all the commands in one place for quick reference.
Minikube is a lightweight Kubernetes cluster that enables you to run Kubernetes clusters locally. It's ideal for learning Kubernetes while developing and testing on a single machine.
More information about minikube can be found here: https://minikube.sigs.k8s.io/docs/
- Install minikube (Ref: https://minikube.sigs.k8s.io/docs/start)
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube && rm minikube-linux-amd64
- Install docker (Ref: https://docs.docker.com/engine/install/ubuntu/)
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
- Add current user to docker group
sudo usermod -aG docker $USER && newgrp docker
- Install kubectl (Ref: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
sudo chmod +x kubectl
sudo mv kubectl /usr/local/bin
alias k=kubectl
- Start minikube
minikube start
# Once started
k get nodes
# To get a list of underlying nodes
k get pods -A
# To get a list of all the pods from all namespaces
- Get minikube's IP and enable ingress controller
minikube ip
minikube addons enable ingress