Kubernetes deployment with Helm

This chart bootstraps a Tawon deployment on a Kubernetes cluster using the Helm package manager.

Requirements

Tested on:

  • Kubernetes 1.16.6

  • Helm 3.2.4

Preparation

The tawon namespace

We will isolate Tawon in its own namespace as to not interfere with the rest of the cluster configuration.

kubectl create namespace tawon

Tawon Installation

We will install Tawon with a Helm Chart.

There are only a few values your must customize, notably imageCredentials.username, imageCredentials.password and the configuration needed to reach NATS, i.e. nats.host. Then, to install the chart with the release name tawon:

helm install tawon tawon.tgz -n tawon \
--set imageCredentials.username=<username> \
--set imageCredentials.password=<password>

where:

  • <username>: your quay username;

  • <password>: your quay password;

This installation of NATS/STAN has no persistence, no redundancy, no scalability. Check out the NATS documentation for more information about various Kubernetes installation options.

Enable Prometheus and Grafana

The tawon chart can also deploy kube-prometheus-metrics chart by passing --set kubePrometheusStack.enabled=true to the helm installation command:

helm install tawon tawon.tgz -n tawon \
--set imageCredentials.username=<username> \
--set imageCredentials.password=<password> \
--set kubePrometheusStack.enabled=true \
--set nats.exporter.enabled=true \
--set nats.exporter.serviceMonitor.enabled=true

The following components will be deployed:

By default, the metrics are exposed in the following ports:

Table 1. Exposed ports
Component Ports

tawon-agent

9900

tawon-controller

9990

tawon-worker

9992

Note: See Tawon Metrics page for more information.

You can disable the tawon and nats metrics to be pulled by Prometheus:

helm  install tawon /work/mantisnet/tawon/deploy/helm -n tawon --create-namespace \
--set imageCredentials.username=<username> \
--set imageCredentials.password=<password> \
--set worker.enabled=true \
--set nats.enabled=true \
--set kubePrometheusStack.enabled=true \
--set controller.serviceMonitor.selfMonitor=true \
--set worker.podMonitor.selfMonitor=false \
--set agent.podMonitor.selfMonitor=false \
--set nats.exporter.serviceMonitor.enabled=false