Setup K8S single node with docker desktop and Helm

Ekapop Boonrote
3 min readMar 14, 2021

--

Docker Desktop includes a standalone Kubernetes server and client, as well as Docker CLI integration. The Kubernetes server runs locally within your Docker instance, is not configurable, and is a single-node cluster.

The Kubernetes server runs within a Docker container on your local system, and is only for local testing. When Kubernetes support is enabled, you can deploy your workloads, in parallel, on Kubernetes, Swarm, and as standalone containers. Enabling or disabling the Kubernetes server does not affect your other workloads.

  1. Install Docker Desktop

Download Docker Desktop and choose docker version follow your OS

After your downloaded and Installed go to Preferences… and go to Kubernetes menu:

Enable Kubernetes, Deploy Docker, and Show system container then click Apply & Restart after docker and Kubernetes is running so we can run “kubectl version” and “kubectl get ns”

2. Installing helm (install follow your OS)

Go to https://helm.sh/docs/intro/install/

brew install helm" after successful you can run command for test helm with “helm version” it will be show

and then you go to https://artifacthub.io/ and find “Ingress nginx”

and go to detail for install chart

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx

helm repo update

and

helm install my-ingress-nginx ingress-nginx/ingress-nginx --version 3.24.0

After finished install you can run “kubectl get svc -n default” for check ingress-nginx ready or not

If you found problem service can not assign localhost into my-ingress-nginx-controller you can restart docker desktop and check it again, If it still pendding you can restart your laptop

This is template for create ingress to reference to your service

After you ready to create ingress you should modified your hosts file for map Host name to your IP

sudo vi /etc/hosts

Thank you..

--

--