(Jan 2024) DevOps – How to Install minikube
In the previous article we installed kubectl (read here: https://bit.ly/47MLmlN), a command line utility to interact with Kubernetes cluster. In this article we will go through installing minikube. minikube allows you to run kubernetes cluster locally just like kind; which requires Docker or Podman.
Steps to Install minikube on a Linux RHEL release 8.8 (Ootpa)
Requirements
- 2 CPUs or more
- 2GB of free memory
- 20GB of free disk space
- Internet connection
- Container or virtual machine manager, such as: Docker, QEMU, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMware Fusion/Workstation
For this particular installation we are using Podman. The docker package is not shipped or supported by Red Hat for Red Hat Enterprise Linux (RHEL) 8 and (RHEL) 9. The docker container engine is replaced by a suite of tools in the Container Tools module.
The podman container engine replaced docker as the preferred, maintained, and supported container runtime of choice for Red Hat Enterprise Linux 8 and 9 systems. The podman provides a docker compatible command line experience enabling users to find, run, build, and share containers. The podman uses buildah and skopeo as libraries for the build and push.
Read more about these tools here: https://red.ht/3SbNQ7b
Install Podman Steps
As sudo or root it is a good habit to run updates
sudo dnf -y updateConfirm Podman is not already installed
which podmanInstall podman
sudo yum module enable -y container-tools:rhel8 sudo yum module install -y container-tools:rhel8The
container-tools:rhel8is the fast application stream, containing most recent rolling versions of the tools. Use thecontainer-tools:2.0 streamfor stable versions of Podman 1.6. The commandyum module list container-toolsshows the available streams.Confirm podman installed
which podman
Install minikube
To install the latest minikube stable release on x86-64 Linux using binary download:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikubeThe install command does not produce any output, to confirm that minikube was installed run which minikube.
Start Cluster
minikube startNote: Fix: Add sas ID to the Sudoers file for podman command
Interact with New Cluster
Kubectl was installed with minikube following are some examples of interacting with new cluster:
minikube kubectl -- get poYou can also create an alias:
alias kubectl="minikube kubectl --"For additional insight into your cluster state, minikube bundles the Kubernetes Dashboard, allowing you to get easily acclimated to your new environment:
minikube dashboardAppendix
To install Docker on Linux supported platforms such as Fedora, Ubuntu, Debian there is a script available to facilitate easy installation experience. Read through the comments and this installation is not recommended for Production environments. Script is get.docker.com.