〈 Local Kubernetes
Docker and Kubernetes are fairly mature and now have many alternative implementations that you can run localy. Some alternatives are explored below.
Minikube and Colima
Minikube is a lightweight k8s implementation that creates a local cluster with a simple one node cluster.
Prerequisites
You need a container service. You can use Docker or Colima as a light weight alternative
Installing Colima is easy with your typical OSX package managers: Colima Mac Install
brew install Colima
colima start --kubernetes
Useful commands
colima start- starts colima. Useful Options:
--cpu,--memory(GBs),--disk(GBs),--arch(deafult: aarch64),--kubernetes colima list- List all colima profiles
colima ssh -p [default]- SSH into the the colima container matching the profile(
-pdefault:default) minikube start- start minikube
alias kubectl="minikube kubectl --"- You can use minikube’s kubectl for guaranteed compatibility
minikube dashboard- bring up a dashboard displaying the status of your minikube cluster in a web browser
minikube status- Show the the status of minkube in thwe CLI
Podman and K3D
You need a container service. Docker should probably be your default but I’ve been playing with podman because it offers rootless alternative to docker which is largely drop-in compatible.
Installing podman
brew install podmanpodman machine initpodman machine start
Working locally with k3d
see: https://k3d.io/v5.5.1/usage/advanced/podman/#macos
podman system connection ls
Create a cluster
export DOCKER_HOST=ssh://root@localhost:53685
export DOCKER_SOCK=/run/podman/podman.sock
Setup podman network
podman network create k3d
podman network inspect k3d -f '{{ .DNSEnabled }}'
k0S
k0sproject.io k0s is the simple, solid & certified Kubernetes distribution that works on any infrastructure: bare-metal, on-premises, edge, IoT, public & private clouds. It’s 100% open source & free.
K3S
k3s.io Lightweight Kubernetes built for IoT & Edge computing - Rancher
MicroK8s
microk8s Zero-ops, pure-upstream, HA Kubernetes, from developer workstations to production