Install Minikube on Oracle Linux
Introduction
Minikube is a popular tool for developers and administrators to run a fully functional Kubernetes cluster in their local environment.
Although minikube is cross-platform, this tutorial only guides you through the installation and configuration of minikube with the podman driver.
Objectives
In this lab, you'll learn to:
- Download & install minikube and Podman on Oracle Linux
- Configure minikube to use the podman driver
- Verify the installation of minikube
Prerequisites
- A system with Oracle Linux installed with the following hardware and configuration:
- 2 CPUs (or more)
- 2Gb memory (or more)
- 20Gb free disk space for minikube itself
- Using minikube requires more space if installing minikube Addons or deploying any projects
- a non-root user with
sudo
permissions
Update Oracle Linux
Note: When using the free lab environment, see Oracle Linux Lab Basics for connection and other usage instructions.
If not already connected, open a terminal and connect via ssh to the ol-minikube system.
ssh oracle@<ip_address_of_ol-minikube>
Ensure Oracle Linux is up to date.
sudo dnf -y update
The update may take a few minutes to complete. If a new kernel package applies during the update, reboot the system using
sudo reboot
and then log in again to continue.Install Podman and other required packages.
sudo dnf install -y podman podman-docker conntrack
The conntrack package provides the means to set up High-availability clusters.
Verify
curl
is installed.sudo dnf list --installed curl
If not, install it.
sudo dnf -y install curl
Install Minikube
This installation uses a Podman container to spin up Kubernetes using minikube.
Download the minikube binary.
cd ~; curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
Example Output:
[oracle@ol-minikube ~]$ cd ~; curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 80.0M 100 80.0M 0 0 28.6M 0 0:00:02 0:00:02 --:--:-- 28.6M
Install the minikube binary.
sudo install minikube-linux-amd64 /usr/local/bin/minikube
The
install
program copies a compiled binary into the location specified and does not present any output when performing this task.
Start Cluster
Start minikube using the podman driver.
minikube start --driver=podman
Example Output:
[oracle@ol-minikube ~]$ minikube start --driver=podman ���� minikube v1.30.1 on Oracle 9.1 (amd64) ��� Using the podman driver based on user configuration ���� Using Podman driver with root privileges ���� Starting control plane node minikube in cluster minikube ���� Pulling base image ... E0613 21:04:34.634685 13717 cache.go:188] Error downloading kic artifacts: not yet implemented, see issue #8426 ���� Creating podman container (CPUs=2, Memory=3900MB) ...| ���� Preparing Kubernetes v1.26.3 on Docker 23.0.2 ... ��� 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 ���� kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A' ���� Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
Note: The
E0413 14:04:23.810646 97911 cache.go:203] Error downloading kic artifacts: not yet implemented, see issue #8426
is a known issue in the current version of Podman, which the developer plans to resolve in a future version (This doesn't impact most deployment scenarios)Emoji Note: The
����
in the Minkube console output displays on this platform due to a missing font with emoji support, such asgoogle-noto-emoji-color-fonts
. To avoid this issue, set theMINIKUBE_IN_STYLE
environment variable to0
orfalse
like this:MINIKUBE_IN_STYLE=0 minikube start --driver=podman
. See the minikube faq for more details.The start process can take several minutes, so let me explain what is occurring now. Because this is the first time starting the minikube process on this system, it downloads the latest version of Kubernetes certified to run on minikube. Once downloaded, it installs and configures the cluster, ready for later use.
Confirm you have a functional system.
minikube kubectl -- get pods -A
Example Output:
[oracle@ol-minikube ~]$ minikube kubectl -- get pods -A kubectl.sha256: 64 B / 64 B [-------------------------] 100.00% ? p/s 0s kubectl: 45.81 MiB / 45.81 MiB [------------] 100.00% 28.18 MiB p/s 1.8s NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-787d4945fb-f8hv6 1/1 Running 0 6m30s kube-system etcd-minikube 1/1 Running 0 6m43s kube-system kube-apiserver-minikube 1/1 Running 0 6m43s kube-system kube-controller-manager-minikube 1/1 Running 0 6m43s kube-system kube-proxy-bqk4k 1/1 Running 0 6m30s kube-system kube-scheduler-minikube 1/1 Running 0 6m44s kube-system storage-provisioner 1/1 Running 1 (6m ago) 6m41s
The output confirms that everything is up and running correctly and ready for deploying locally developed applications to minikube for testing.
(Optional) Create an alias
To avoid extra typing, create an alias for
kubectl
in the shell config.echo 'alias kubectl="minikube kubectl --"' >> ~/.bashrc source ~/.bashrc
Test the alias using
kubectl get pods -A
.
Summary
Getting minikube installed is only the start, and it's a helpful tool to aid with local testing and development. Keep checking back for further examples of using minikube with Podman on Oracle Linux.
For More Information
See other related resources: