Installing local Kubernetes cluster with docker desktop is the preferred method in this tutorial as it is very easy and comes with kubectl CLI.
If you have not installed kubernetes from docker-desktop before:
To enable Kubernetes in Docker Desktop:
- 1: Open the GUI
- 2: Click on the gear icon in the upper right corner
- 3: Click on the "Enable Kubernetes" toggle. Just leave everything as default.
- 4: Click "Apply & Restart" in the lower right corner.
- 5: Wait until it says "Running" under "Cluster"
- 6: Open a new terminal and check that you are able to run
kubectl version
Expected output for kubectl version is
Client Version: v<your-version>
Kustomize Version: v<your-version>
Server Version: v<your-version>
If you have kubectl previously installed it is nice to verify that you are doing this tutorial in docker desktop and not on your production cluster with
kubectl config use-context docker-desktopGo to app/frontend directory
To build docker image run
docker build -t blog-frontend:0.1 .Go to app/api directory.
Build docker image with
docker build -t blog-api:0.1 .Go to app/image-job
docker build -t image-job:0.1 .If you do not have problems with the above setup, you do not have to read the rest
https://kind.sigs.k8s.io/docs/user/quick-start/
https://minikube.sigs.k8s.io/docs/start/
If you cant run kubectl after enabling Kubernetes in Docker Desktop, you can try installing it manually through: https://kubernetes.io/docs/tasks/tools/#kubectl
It is also available through homebrew (mac): brew install kubectl