Install Minikube on Oracle Linux

0
0
Send lab feedback

Install Minikube on Oracle Linux

Introduction

Minikube is a popular tool used by both developers, and administrators, to enable them to have a fully functional Kubernetes cluster running on their local environment.

Although Minikube is cross-platform, this tutorial only guides you through 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 that Minikube installed successfully

Prerequisites

  • A system with Oracle Linux 8 installed with the following hardware and configuration:
    • 2 CPUs (or more)
    • 2Gb memory (or more)
    • 20Gb free disk space for Minikube itself (more is required for if Minikube Addons, or for your own projects)
    • a non-root user with sudo permissions

Oracle Support Disclaimer

Oracle does not provide technical support for the sequence of steps that are provided in the following instructions because these steps refer to software programs and operating systems that are not provided by Oracle. This tutorial provides optional instructions as a convenience only.

Oracle's supported method for the development and management of cloud-native applications is Oracle Cloud Native Environment. For more information, see https://docs.oracle.com/en/operating-systems/olcne/ .

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

This may take a few minutes to complete.

Install the container-tools module, which includes podman.

sudo dnf -y module install container-tools:ol8

Install the Conntrack tools, which provide the means to setup High-availability clusters.

sudo dnf -y install conntrack

Verify curl is installed.

sudo dnf list --installed curl

If not, install it.

sudo dnf -y install curl

Install Minikube

Download the Minikube binary to your home directory.

cd ~; curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

Example Output:

[oracle@ol-minikube ~]$ 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 69.2M  100 69.2M    0     0   152M      0 --:--:-- --:--:-- --:--:--  152M

Install the Minikube binary.

sudo install minikube-linux-amd64 /usr/local/bin/minikube

Example Output:

[oracle@ol-minikube ~]$ sudo install minikube-linux-amd64 /usr/local/bin/minikube
[oracle@ol-minikube ~]$ 

It looks like nothing happened. Don't worry that there isn't any visual confirmation at this stage. However, that should all change in the next section when starting Minikube.

Start Cluster

Start minikube with the podman driver only.

minikube start --driver=podman

Example Output:

[oracle@ol-minikube ~]$ minikube start --driver=podman
����  minikube v1.25.2 on Oracle 8.5 (amd64)
���  Using the podman driver based on user configuration
����  Starting control plane node minikube in cluster minikube
����  Pulling base image ...
����  Downloading Kubernetes v1.23.3 preload ...
    > preloaded-images-k8s-v17-v1...: 505.68 MiB / 505.68 MiB  100.00% 109.70 M
    > gcr.io/k8s-minikube/kicbase: 379.06 MiB / 379.06 MiB  100.00% 31.51 MiB p
E0413 14:04:23.810646   97911 cache.go:203] Error downloading kic artifacts:  not yet implemented, see issue #8426
����  Creating podman container (CPUs=2, Memory=3900MB) ...
����  Preparing Kubernetes v1.23.3 on Docker 20.10.12 ...
    ��� kubelet.housekeeping-interval=5m
    ��� Generating certificates and keys ...
    ��� Booting up control plane ...
    ��� Configuring RBAC rules ...
����  Verifying Kubernetes components...
    ��� Using image gcr.io/k8s-minikube/storage-provisioner:v5
����  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 will be resolved 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 it not having a font with emoji support installed. This will not be an issue on most standalone Oracle Linux install. If you are unable to install a font with emoji support, or just prefer not to display them then please set the MINIKUBE_IN_STYLE environment variable to 0 or false like this: MINIKUBE_IN_STYLE=0 minikube start --driver=podman instead. (See https://minikube.sigs.k8s.io/docs/faq/ for more details)

The start process can take several minutes to complete, so let me fill you in on 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: 44.43 MiB / 44.43 MiB [--------------------] 100.00% ? p/s 200ms
NAMESPACE     NAME                               READY   STATUS    RESTARTS      AGE
kube-system   coredns-64897985d-bczzc            1/1     Running   0             2m4s
kube-system   etcd-minikube                      1/1     Running   0             2m17s
kube-system   kube-apiserver-minikube            1/1     Running   0             2m17s
kube-system   kube-controller-manager-minikube   1/1     Running   0             2m17s
kube-system   kube-proxy-tq4gj                   1/1     Running   0             2m4s
kube-system   kube-scheduler-minikube            1/1     Running   0             2m16s
kube-system   storage-provisioner                1/1     Running   1 (94s ago)   2m15s

The output confirms that everything is up and running correctly and ready for you to deploy your locally developed applications to minikube for testing.

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 how to use Minikube together with Podman on Oracle Linux.

For More Information

See other related resources:

SSR