In this article, unlock the potential of configuration management with Ansible as we guide you through practical examples. Table of Contents Introduction In todayβs dynamic
In this article, we will review how to install minikube-v1.32.0 on RHEL9. This is the most recent stable release as of the date of this publication.
Please be aware that older versions of Minikube may encounter common issues such as expired certificates and outdated versions of Docker and other Kubernetes components, which can lead to installation failures.
Minikube, a lightweight Kubernetes distribution designed for local development and testing purposes, has evolved significantly since its inception. Initially released by Kubernetes as an open-source project in 2016, Minikube quickly gained popularity among developers seeking a convenient way to run Kubernetes clusters locally.
Over the years, Minikube has undergone several iterations and enhancements, with continuous improvements to its features, stability, and ease of use. As Kubernetes adoption surged, Minikube became an indispensable tool for developers, providing a reliable environment for experimenting with Kubernetes concepts, developing applications, and testing configurations before deployment to production environments.
Before installing Minikube on Red Hat Enterprise Linux (RHEL 9), there are a few prerequisites that need to be met. These include:
A working installation of the latest Docker release on your system.
The latest version of the kubectl command-line tool installed.
A browser (e.g. Firefox, google chrome, etc) installed for accessing the Kubernetes dashboard
An administrative account with sudo privileges to access root (e.g.
admin
)
A registered RHEL physical server or virtual machine (e.g.
subscription-manager register
)
At least 4GB of RAM and 2 CPU cores are recommended, although these requirements may vary based on the available resources in your environment.
Hostname | mkube-srv1.localdomain |
IP address | 192.168.1.153 |
RAM | 4 |
Cores | 2 |
Docker Version | Docker version 25.0.1, build 29cf629 |
Kubectl Version | { “clientVersion”: { “major”: “1”, “minor”: “29”, “gitVersion”: “v1.29.1”, “gitCommit”: “bc401b91f2782410b3fb3f9acf43a995c4de90d2”, “gitTreeState”: “clean”, “buildDate”: “2024-01-17T15:51:03Z”, “goVersion”: “go1.21.6”, “compiler”: “gc”, “platform”: “linux/amd64” }, “kustomizeVersion”: “v5.0.4-0.20230601165947-6ce0bf390ce3” } |
Kubernetes Version | v1.28.3 |
Minikube Version | v1-32.0 |
Follow these steps to install minikube-v1.32.0 on RHEL9 or CentOS9:
Before we proceed, it’s best practice to ensure our machine or instance is up-to-date:
[admin@mkube-srv1 ~]$ sudo dnf update -y
NOTE: If wget
and xorg-x11-xauth
are not already installed, it’s necessary to do so in order to download the required dependencies for subsequent steps and access the kubernetes dashboard.
[admin@mkube-srv1 ~]$ sudo dnf install wget xorg-x11-xauth -y
Now letβs enable the Docker repository and install Docker along with its dependencies:
[admin@mkube-srv1 ~]$ sudo yum install -y yum-utils
[admin@mkube-srv1 ~]$ sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
[admin@mkube-srv1 ~]$ sudo dnf install docker-ce --nobest -y
Run the following command to add your administrative user account to the docker group and ensure the docker service running:
[admin@mkube-srv1 ~]$ sudo usermod -aG docker $USER && newgrp docker
Also, start and enable docker with the following commands:
[admin@mkube-srv1 ~]$ sudo systemctl --now start docker
Run the following curl
command to install the latest stable kubectl release:
[admin@mkube-srv1 ~]$ sudo curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
Make kubectl executable by running the following commands:
[admin@mkube-srv1 ~]$ sudo chmod +x kubectl
[admin@mkube-srv1 ~]$ sudo mv kubectl /usr/local/bin/
Install the conntrack package using dnf:
[admin@mkube-srv1 ~]$ sudo dnf install -y conntrack
Run the following commands to install and enable crictl for Kubernetes:
[admin@mkube-srv1 ~]$ sudo curl -LO https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.22.0/crictl-v1.22.0-linux-amd64.tar.gz
[admin@mkube-srv1 ~]$ sudo tar -C /usr/local/bin -xzvf crictl-v1.22.0-linux-amd64.tar.gz
[admin@mkube-srv1 ~]$ sudo rm crictl-v1.22.0-linux-amd64.tar.gz
Finally, install the latest and stable minikube release with the following commands:
[admin@mkube-srv1 ~]$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm
[admin@mkube-srv1 ~]$ sudo rpm -ivh minikube-latest.x86_64.rpm
Now lets start minikube and confirm it was installed successfully.
[admin@mkube-srv1 ~]$ minikube start
π minikube v1.32.0 on Redhat 9.3 (vbox/amd64)
β¨ Automatically selected the docker driver. Other choices: none, ssh
π Using Docker driver with root privileges
π Starting control plane node minikube in cluster minikube
π Pulling base image ...
πΎ Downloading Kubernetes v1.28.3 preload ...
> preloaded-images-k8s-v18-v1...: 403.35 MiB / 403.35 MiB 100.00% 8.05 Mi
> gcr.io/k8s-minikube/kicbase...: 453.90 MiB / 453.90 MiB 100.00% 5.88 Mi
π₯ Creating docker container (CPUs=2, Memory=2200MB) ...
π³ Preparing Kubernetes v1.28.3 on Docker 24.0.7 ...
βͺ Generating certificates and keys ...
βͺ Booting up control plane ...
βͺ Configuring RBAC rules ...
π Configuring bridge CNI (Container Networking Interface) ...
βͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5
π Verifying Kubernetes components...
π Enabled addons: storage-provisioner, default-storageclass
π Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
This is an opportune moment to step away from the terminal, stretch your legs, or perhaps grab a cup of coffee. The installation process involves several packages and will require a few minutes to complete.
Finally, use kubectl
to verify minikube is installed and running properly:
[admin@mkube-srv1 ~]$ kubectl cluster-info
Kubernetes control plane is running at https://192.168.49.2:8443
CoreDNS is running at https://192.168.49.2:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Minikube also provides a web-based dashboard that you can use to manage your Kubernetes cluster. To access the dashboard, run the following command:
[admin@mkube-srv1 ~]$ minikube dashboard
π Enabling dashboard ...
βͺ Using image docker.io/kubernetesui/dashboard:v2.7.0
βͺ Using image docker.io/kubernetesui/metrics-scraper:v1.0.8
π‘ Some dashboard features require the metrics-server addon. To enable all features please run:
minikube addons enable metrics-server
π€ Verifying dashboard health ...
π Launching proxy ...
π€ Verifying proxy health ...
π Opening http://127.0.0.1:44801/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/ in your default browser...
π http://127.0.0.1:44801/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
Forward X11 to the minikube server and launch Firefox or your favorite browser and enter the URL provided above:
In this instance, the URL provided is: http://127.0.0.1:44801/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
[admin@mkube-srv1 ~]$ firefox &
Photo by admingeek from Infotechys
Minikube serves as an invaluable tool for testing and developing Kubernetes applications directly on your local machine. In this guide, we’ve presented a detailed, step-by-step walkthrough for installing Minikube on RHEL9 or CentOS9, covering essential prerequisites like Docker and kubectl.
Minikube empowers you to refine and validate your Kubernetes applications locally before transitioning them to a production setting. However, it’s crucial to note that Minikube isn’t intended for production environments; its purpose is solely for testing and development.
Following the recommendations outlined in this guide ensures the stability, security, and dependability of your Minikube environment. Did this guide facilitate your introduction to Minikube on RHEL9 or CentOS9? If so, feel free to share your feedback by leaving a comment below and spreading the word about this resource!
Related Posts
In this article, unlock the potential of configuration management with Ansible as we guide you through practical examples. Table of Contents Introduction In todayβs dynamic
In this tutorial, we will review the Kubernetes cluster install on CentOS8. This procedure will mirror our previous article about this subject. Install a Kubernetes
If you’re a developer or IT professional looking to test and deploy Kubernetes applications, learn how to install Minikube on RHEL9 or CentOS9 with this