A local cluster is included for rapid prototyping, debugging and non-production work. Currently two local deployment options are available – Docker Desktop and Minikube. It is strongly advised to use Docker Desktop, since Minikube is only included for running integration tests.
Attention to resource handling is required when deploying a local kaos cluster since performance is directly linked to available isolated resources (within Docker).
A correctly running local kubernetes cluster is absolutely necessary prior to deploying kaos. The following steps are required before building kaos.
A local kubernetes cluster within Docker Desktop must be enabled.
The following resource requirements are suggested for running the Quick Start locally.
2) Set Kubernetes Context
Kubernetes conveniently organizes groups of configuration parameters under a specific name, a context, in order to communicate with the desired cluster. Therefore, the correct cluster context associated with Docker Desktop needs to be set.
$ kubectl config current-contextdocker-desktop
A successfully running local cluster with Docker Desktop will yield the following response.
$ kubectl get allNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEservice/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 2m
Lastly, a local kaos cluster with Docker Desktop is built and destroyed as follows.
kaos build deploy -c DOCKER -vkaos destroy -c DOCKER -v
kaos can be built and destroyed within minikube with the following commands.
kaos build deploy -c MINIKUBE -vkaos destroy -c MINIKUBE -v
The running kaos backend endpoint (via ambassador as an API gateway) can only be accessed after configuring the necessary port forwarding.
kubectl port-forward svc/ambassador 30123:80 &