Site icon Ron Ekins' – Oracle Technology, DevOps and Kubernetes Blog

Learn Kubernetes on your ARM MacBook with Podman and Minikube

Kubernetes

I recently had the pleasure of delivering a presentation on Kubernetes and the Oracle Kubernetes Engine (OKE) to the All India Oracle User Group (AIOUG).

A question which was raised by an attendee was ‘Can I learn Kubernetes without using the Oracle Cloud Infrastructure (OCI) OKE or other Cloud service?

Well the answer is yes, and this blog post I will share how to use Podman and Minikube to deliver an Kubernetes educational environment on a MacBook.

Podman Desktop

I have already installed Podman Desktop version 1.19.2, however if you have yet to install the Podman Desktop or are running an older version this can easily be fixed using brew install or brew upgrade for example:

% brew install podman-desktop
% brew upgrade pod man-desktop

Start the Podman Desktop, from Settings, Resources select Podman and click on Create new

Podman – create new

Now configure the Podman machine, for example I have left the machine name to default podman-machine-default, but updated the CPU(s) to 4, Memory to 4GB and Disk Size 40GB.

Create Podman machine

When ready click Create.

Minikube Cluster

Now you have a running Podman Machine, return to the Resources panel, navigate to Minikube and click on Create new

Create Minikube cluster

On completion, we are presented with a Creation Successful operation message.

From the Resource panel we can now see we have a running Podman Machine and Minikube cluster.

Minikube Status

Using a terminal we can confirm the status and version of Minikube with minikube status and minikube version, for example:

% minikube status

% minikube version
minikube status

Kubenetes Config Contexts

If you are work with other Kubernetes environments use kubectl config get-contexts to check you are using the minikube context.

% kubectl config get-contexts
kubectl config get-contexts

Kubenetes Cluster Info

Use kubectl cluster-info to check the health of our Kubernetes cluster

% kubectl cluster-info
kubectl cluster-info

Kubernetes version

Now confirm the Kubernetes version of your cluster with kubectl version.

% kubectl version  | awk -Fv '/Server Version: / {print $3}'
kubenetes version

Now we have confirmed we have a using the minikube context, the cluster is healthy, and we are using the correct version we are ready to start using Kubernetes.

Kubernetes nodes

Using kubectl get nodes, we can see details of our newly created single node cluster for example

% kubectl get nodes -o wide
kubectl get nodes

Kubenetes pods

And finally, confirm running Kubernetes pods with kubectl get pod, using the -A option will show All the running pods.

% kubectl get pod -A

kubectl get pods

Kubernetes Dashboard

The Podman Desktop provides a powerful, easy to use Kubernetes Dashboard which you can find on in the left panel.

From here we can explore Nodes, Deployments, Pods, Services, Ingresses & Routes, Persistent Volume Claims (PVCs), ConfigMaps & Secrets, Jobs and CronJobs for the selected Kubernetes namespace.

Below is a view of my kube-system namespace.

Podman Kubernetes Dashboard

Summary

In this blog post I have shared how to create a Kubernetes educational environment on a MacBook with podman and minikube.

In subsequent blogs we will revisit this environment and look at deploying applications

Exit mobile version