DEV Community

Sunny Bhambhani for AWS Community Builders

Posted on • Edited on

Quick guide to install minikube and enable ingress controller on Ubuntu

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/

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
Enter fullscreen mode Exit fullscreen mode
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
Enter fullscreen mode Exit fullscreen mode
  • Add current user to docker group
sudo usermod -aG docker $USER && newgrp docker
Enter fullscreen mode Exit fullscreen mode
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
Enter fullscreen mode Exit fullscreen mode
  • 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
Enter fullscreen mode Exit fullscreen mode
  • Get minikube's IP and enable ingress controller
minikube ip
minikube addons enable ingress
Enter fullscreen mode Exit fullscreen mode

Top comments (0)