Local Kubernetes on Mac Apple Silicon without Docker
Install and use local Kubernetes on Mac Apple Silicon with Parallels Desktop for Mac
Audience consideration for this tutorial: Someone who wants to test the code on local Kubernetes cluster and has Apple Mac devices with Apple Silicon.
Prerequisite:
Apple Mac machine 💻 / 🖥️
Parallels Desktop (non-pro version will also work)
Some free storage on your SSD
Steps 🛠️:
Create a Linux VM
Install prerequisites in the Linux VM
Install Kubernetes (Let’s call it k8s henceforth) and related applications for the k8s deployment.
Cluster creation
Step 1:
Download the rocky linux (a clone of RHEL). Here is the download link of rocky 9 for arm64 architecture (i.e. for Apple Silicon).
Create a linux VM by following this guide: Install Linux virtual machine on a Mac with Apple M-Series chip .
While installing, please select OS type as Red Hat Enterprise Linux / CentOS Linux. Like this:
Proceed with further process of the OS installation.
Step 2:
Start the vm and then install prerequisites with below commands
sudo dnf install openssh-server
ip address # note down the ip address
PS: Please use the host IP address noted from above command to ssh the vm. It will be easy to just copy and paste commands from below section.
Step 3:
Install required libraries 👇 , GitHub link 🔗 for commands : k8s-kind-podman-installation-command.sh
Step 4:
Create cluster through
kind
kind create cluster # default cluster is name is kind
kubectl cluster-info # check k8s cluster info
#or
kubectl cluster-info --context kind-kind
podman ps # check podman status
Now you can use this cluster as any other normal testing k8s cluster. 😀😀