WombatOAM Kubernetes Deployment Guide
This guide provides step-by-step instructions for deploying WombatOAM in a Kubernetes cluster to monitor your Erlang/Elixir nodes.
Prerequisites
Section titled “Prerequisites”- kubectl - Kubernetes command-line tool
- Helm 3 - Package manager for Kubernetes
- Kubernetes cluster - minikube, kind, or any other Kubernetes cluster
- Your Erlang/Elixir nodes already running in Kubernetes
- A WombatOAM license that permits Kubernetes (see Licensing)
Deployment Steps
Section titled “Deployment Steps”Step 1: Start Your Kubernetes Cluster
Section titled “Step 1: Start Your Kubernetes Cluster”Verify the cluster is running:
kubectl cluster-infoStep 2: Add WombatOAM Helm Repository
Section titled “Step 2: Add WombatOAM Helm Repository”helm repo add wombat https://esl.github.io/helm-chart/charts/wombatCharthelm repo updateStep 3: Configure WombatOAM Values
Section titled “Step 3: Configure WombatOAM Values”Create a file named wombat-values.yaml on the machine where you run helm
(the same machine you use for kubectl). It does not go inside the cluster or
the WombatOAM installation: Helm reads it when you install the chart and passes
the values to the WombatOAM pod. You can put it in any directory; the commands
below assume you run them from the directory that contains it.
Add your configuration to the file:
# Kubernetes Discovery ConfigurationkubernetesDiscovery: # Namespace where your Erlang/Elixir nodes are running namespace: "NAMESPACE"
# Service name for your Erlang/Elixir application service: "my-elixir-app"
# Application name (should match your node name) appname: "my_elixir_app"
# Erlang distribution cookie (must match your nodes' cookie) cookie: "secret-cookie"
# Directory on the Kubernetes node where WombatOAM keeps its data and logshostPath: "/opt/wombat"
# Optional: keep settings saved in the GUI when the pod is recreated# wombatConfig:# enabled: true
# Optional: custom EPMD port (default is 4369)# epmdPort: 4369From WombatOAM 4.3.0 you can leave any of the four kubernetesDiscovery
values empty and set it in the GUI after installing instead, see
Configuring Discovery in the GUI. Values
set in wombat-values.yaml cannot be changed in the GUI.
Step 4: Install WombatOAM
Section titled “Step 4: Install WombatOAM”From the directory that contains wombat-values.yaml, install WombatOAM using
Helm:
helm install -f wombat-values.yaml wombat wombat/wombatIf WombatOAM is already installed, see Changing the Values After Installation.
If you run helm from a different directory, pass the full path to the file
instead, for example -f ~/wombat/wombat-values.yaml.
Step 5: Verify WombatOAM is Running
Section titled “Step 5: Verify WombatOAM is Running”Check the pod status:
kubectl get pods -n monitoring -l app=wombatYou should see the WombatOAM pod in Running status.
Check the service:
kubectl get svc -n monitoring wombatStep 6: Access WombatOAM GUI
Section titled “Step 6: Access WombatOAM GUI”Port-forward the WombatOAM service to your local machine:
kubectl port-forward svc/wombat 8080:8080 -n monitoringOpen your browser and navigate to http://localhost:8080.
Login with the default credentials:
- Username: admin
- Password: admin
Changing the Values After Installation
Section titled “Changing the Values After Installation”The chart runs WombatOAM as a single pod, and Kubernetes does not allow changing
the environment of a running pod. A plain helm upgrade with changed values
therefore fails with pod updates may not change fields other than ....
Delete the pod first; the upgrade then creates it again with the new values:
kubectl delete pod wombat -n monitoringhelm upgrade -f wombat-values.yaml wombat wombat/wombatThe data in hostPath (including users and passwords) is kept. Settings saved
in the GUI are only kept with wombatConfig.enabled, see
Keeping Settings Saved in the GUI.
Using a Custom EPMD Port
Section titled “Using a Custom EPMD Port”By default EPMD listens on port 4369. The epmdPort value in wombat-values.yaml sets the ERL_EPMD_PORT environment variable inside the WombatOAM pod, so it must match the port your Erlang/Elixir nodes are using.
To change it, set epmdPort in your wombat-values.yaml:
kubernetesDiscovery: namespace: "NAMESPACE" service: "my-elixir-app" appname: "my_elixir_app" cookie: "secret-cookie"
hostPath: "/opt/wombat"epmdPort: 12000Then apply the change as described in Changing the Values After Installation.
Configuring Discovery in the GUI
Section titled “Configuring Discovery in the GUI”From WombatOAM 4.3.0, Kubernetes discovery can also be configured in the GUI, under Configuration > Kubernetes (admin users only). The page shows whether discovery is active and why not if it is inactive, how many pods are in the service DNS, how many nodes discovery has added, and how many are waiting to be removed. You can change:
- the service name, namespace, application name and cookie;
- the node expiry, in minutes (see Removing Nodes That Leave the Cluster);
- whether discovery is enabled.
The changes take effect straight away, without restarting WombatOAM.
A value set in wombat-values.yaml is shown read-only, marked “Set by Helm”:
Kubernetes sets it again every time the pod starts, so wombat-values.yaml
stays the place to change it. To manage a value from the GUI, leave it empty in
wombat-values.yaml. If a value is later set in wombat-values.yaml, it
replaces the one saved in the GUI; if it is removed again, the value saved in
the GUI is used.
The settings are saved in wombat.config, as the wo_core/kubernetes_discovery
entry described in the
Configuration reference; you can
also write that entry yourself, for example when you deploy WombatOAM without
the Helm chart. Enable wombatConfig so that the settings are kept when the
pod is recreated, see
Keeping Settings Saved in the GUI.
Removing Nodes That Leave the Cluster
Section titled “Removing Nodes That Leave the Cluster”When a pod disappears from the service DNS, WombatOAM does not remove its node
straight away. The node stays in the topology with a node_down alarm, so a pod
that only drops out briefly (for example, while it fails its readiness probe)
keeps its metrics history and alarms when it returns. If the node is still
missing after 120 hours (5 days), WombatOAM removes it.
To change this period, set nodeExpiryHours (a whole number of hours) under
kubernetesDiscovery in your wombat-values.yaml:
kubernetesDiscovery: namespace: "NAMESPACE" service: "my-elixir-app" appname: "my_elixir_app" cookie: "secret-cookie" nodeExpiryHours: 24Then apply the change as described in Changing the Values After Installation.
If you deploy WombatOAM without the Helm chart, you can instead set the
NODE_EXPIRY_HOURS environment variable on the WombatOAM container, or add the
following line to wombat.config:
{set, wo_core, kubernetes_node_expiry_hours, 24}.If both are set, NODE_EXPIRY_HOURS takes precedence.
From WombatOAM 4.3.0 you can also set the expiry in minutes under
Configuration > Kubernetes, unless nodeExpiryHours is set in
wombat-values.yaml (see
Configuring Discovery in the GUI).
Keeping Settings Saved in the GUI
Section titled “Keeping Settings Saved in the GUI”Settings you change in the WombatOAM GUI (for example under Configuration >
Kubernetes, Email and SMTP, or Data Export) are saved in wombat.config, inside
the pod. By
default they are lost whenever the pod is recreated, for example after
changing the values or when the node
restarts.
To keep them, enable wombatConfig in your wombat-values.yaml:
hostPath: "/opt/wombat"
wombatConfig: enabled: trueWombatOAM then keeps the file on the Kubernetes node as
<hostPath>/config/wombat.config. On the first start the default
wombat.config of the WombatOAM image is copied there; after that the existing
file is used and never overwritten by the chart.
You can also edit this file by hand, for example to add any of the settings
described in Configuration. Keep your own settings above
the line %% GENERATED BY GUI %%: WombatOAM rewrites everything below it when
settings are saved in the GUI, and settings below the line take priority. Then
recreate the pod so that WombatOAM reads the file again:
kubectl delete pod wombat -n monitoringhelm upgrade -f wombat-values.yaml wombat wombat/wombatLicensing
Section titled “Licensing”From WombatOAM 4.3.0, WombatOAM runs in Kubernetes only with a license that
permits it. The license details shown when you first log in (and by the REST
API at /api/help/about) say Kubernetes: permitted or
Kubernetes: not permitted. Contact us if you need a license that permits
Kubernetes.
With a license that does not permit Kubernetes:
- WombatOAM in a pod shows the banner “This license does not permit running WombatOAM on Kubernetes”, does not discover pods, and does not manage any node.
- WombatOAM running outside Kubernetes manages nodes as usual, but refuses nodes that run in Kubernetes pods. The refusal is logged under Licensing.
To change the license, replace <hostPath>/license.lic_key and recreate the
pod:
kubectl delete pod wombat -n monitoringhelm upgrade -f wombat-values.yaml wombat wombat/wombatVerification
Section titled “Verification”Check WombatOAM Logs
Section titled “Check WombatOAM Logs”kubectl logs wombat -n monitoring --tail=50 -fUninstalling WombatOAM
Section titled “Uninstalling WombatOAM”To remove WombatOAM from your cluster:
helm uninstall wombat