Skip to content

Blog rovingdev

Go back

Local Kubernetes on Mac Apple Silicon without Docker

Edit page

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:

Steps πŸ› οΈ:

Step 1:

Step 2:

Terminal window
sudo dnf install openssh-server
ip address # note down the ip address

Step 3:

Terminal window
sudo dnf check-update -y
sudo dnf update -y
sudo dnf update --security -y
sudo dnf groupinstall 'Development Tools' -y
sudo dnf install nano
dnf install go -y
# this will install podman, we are using podman instead of docker
dnf install podman -y
#this will install kubernetes
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl.sha256"
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl version --client
dnf install bash-completion -y
source /usr/share/bash-completion/bash_completion
echo 'source <(kubectl completion bash)' >>~/.bashrc
source ~/.bashrc
#this will install kind, this is better alternative to minikube
[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-arm64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
kind # to check the installation
#install related applications
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
#install kompose to convert docker-compose.yml to k8s manifest yml files
curl -L https://github.com/kubernetes/kompose/releases/download/v1.26.0/kompose-linux-arm64 -o kompose
chmod +x kompose
sudo mv ./kompose /usr/local/bin/kompose

Step 4:

Terminal window
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. πŸ˜€πŸ˜€


Edit page
Share this post on:

Previous Post
What could be the future of Stack Overflow community after OpenAI partnership?