This repository provides several Kubernetes manifests that facilitate the deployment of the KomMonitor platform within a Kubernetes Cluster.
This project uses Kustomize to bundle all required resources for deploying KomMonitor. Hence, you'll find kustomization files at the root and in all subdirectories.
The root of the project also contains configurations for an Ingress as well as an Issuer.
The components subdirectory contains manifests for all services that are required to run KomMonitor
- keycloak: Keycloak configurations and resources
- keycloak-db: Postgres configurations and resources, which will be used as Keycloak DB
- komMonitor: Configurations and resource for all KomMonitor services
- komMonitor-db: PostGIS configurations and resources, which will be used as DB for KomMonitor Data Management
- redis: Configurations and resources for Redis
This repository only provides templates for manifests, which have to be customized for your target cluster environment. Consider the steps listed below to bring KomMonitor into production. Note, that the following steps assume that your cluster is already configured to be ready for deploying KomMonitor related ressources in it and does not cover any cluster provider related actions.
-
Configure a Cert Manager for the KomMonitor Ingress by defining your own Issuer
-
Create your own hidden secrets, which are used by several Pods that run the KomMonitor components. You'll find
secret.yaml
files in all subdirectories for those components that consume secrets. Just add your own Base64 encoded secrets in these files and apply them to your cluster. Note: some secrets assume that you already have a running Keycloak instance and created Keycloak secrets for each KomMonitor client. Hence, you may first deploy Keycloak in your cluster or use a already running instance in order to create those secrets. -
Adapt all
configmap.yaml
files to your cluster deployment. This, in particular, applies to all URLs that reference KomMonitor, DB and Keycloak services in the cluster. -
Apply all resources to your cluster by running
kubectl apply -k .
-
Adapt the Client Config Server configurations files to your cluster deployment. These files are provided by the Client Config Server to the KomMonitor Web Client and contain serveral configuration parameters for the Web Client.
-
Before you open the KomMonitor Web Client the first time, you have to provide the config files from the previous step to the Client Config server. For this purpose you have two options:
a) Copy the files to the container inside your pod into the directory
/code/configStorage
via kubectl cp.b) Add the files to the server by performing a HTTP POST request to all three endpoints:
- https://your.kommonitor.url/client-config/config/client-app-config
- https://your.kommonitor.url/client-config/config/client-keycloak-config
- https://your.kommonitor.url/client-config/config/client-controls-config
Below you'll find an example request for the client-keycloak-config endpoint:
curl --location 'https://your.kommonitor.url/client-config/config/client-keycloak-config' \ --header 'Authorization: Bearer YOUR KECLOAK ACCESS TOKEN' \ --form 'appConfig=@"./components/kommonitor/client-config/config/webClientKeycloakConfig.json"'
Get your own access token from Keycloak and add it to the request. Also adopt the
--location
and--form
parameter. You can also use Postman for performing the request. -
Now, the KomMonitor deployment for your Kubernetes Cluster should be ready for usage. Have fun!