Skip to main content

Installation

Prerequisitesโ€‹

  • A Kubernetes cluster (v1.21+)
  • kubectl configured with cluster access
  • (Optional) Helm 3+ for Helm installation

kwatch needs the following RBAC permissions (all included in the deploy manifest):

ResourceVerbsPurpose
pods, pods/log, events, nodes, nodes/proxy, persistentvolumeclaimsget, watch, listMonitor resources
namespacesget, list, watchMulti-namespace support
daemonsets, statefulsets, deployments, replicasetsget, watch, listOwner resolution
horizontalpodautoscalersget, watch, listHPA monitoring
jobs, cronjobsget, watch, listJob/CronJob monitoring
configmapsget, create, update, patchState persistence
secretsget, list, watchTLS monitoring (optional, uncomment)
kwatchconfigsget, watch, listCRD live reload (optional, uncomment)

Add the repositoryโ€‹

helm repo add kwatch https://kwatch.dev/charts
helm repo update

Create a values fileโ€‹

# values.yaml
config:
alert:
slack:
webhook: "https://hooks.slack.com/services/..."
app:
clusterName: "production-us-east"

Installโ€‹

helm install kwatch kwatch/kwatch \
--namespace kwatch \
--create-namespace \
--values values.yaml \
--version 0.11.0-rc.6

โš ๏ธ Release candidates have no Helm chart โ€” only the stable release publishes to the kwatch/kwatch chart repo. As of the current preview build, 0.11.0 is still a release candidate; for it, use the kubectl method below. This Helm command is documented for the stable release (e.g. 0.10.5) once the RC ships.

Verifyโ€‹

kubectl get pods -n kwatch
# NAME READY STATUS RESTARTS AGE
# kwatch-6f9b7c9d8f-abc12 1/1 Running 0 30s

The pod runs a single container, kwatch โ€” one small pod, no storage.

Upgradeโ€‹

helm repo update
helm upgrade kwatch kwatch/kwatch \
--namespace kwatch \
--values values.yaml

Uninstallโ€‹

helm uninstall kwatch --namespace kwatch

๐Ÿ™ Method 2: kubectl (manual)โ€‹

Step 1: Create the configurationโ€‹

Download the example config:

curl -L https://raw.githubusercontent.com/abahmed/kwatch/v0.11.0-rc.6/deploy/config.yaml -o config.yaml

Edit config.yaml and configure at least one alert provider:

data:
config.yaml: |
alert:
slack:
webhook: "https://hooks.slack.com/services/..."

Remove or comment out providers you don't use. See Channels for all supported providers.

Apply the config:

kubectl apply -f config.yaml

Step 2: Deploy kwatchโ€‹

kubectl apply -f https://raw.githubusercontent.com/abahmed/kwatch/v0.11.0-rc.6/deploy/deploy.yaml

Step 3: Verifyโ€‹

kubectl get pods -n kwatch
# NAME READY STATUS RESTARTS AGE
# kwatch-6f9b7c9d8f-abc12 1/1 Running 0 30s

kubectl logs -n kwatch deployment/kwatch
# I0629 10:00:00.000000 1 main.go:79] "kwatch v0.11.0-rc.6 ..."

Step 4: Test itโ€‹

# Port-forward the health endpoint
kubectl port-forward -n kwatch deployment/kwatch 8060:8060

# Send a test alert
curl -X POST http://localhost:8060/test-alert

If everything is set up correctly, you should receive a test notification on your configured channel.

๐Ÿ’ก /test-alert (and /incidents, /deadletters) require healthCheck.diagnostics: true in your config.


๐Ÿ”ง Method 3: Custom deploymentโ€‹

You can customize the deployment by downloading and editing the manifest:

curl -L https://raw.githubusercontent.com/abahmed/kwatch/v0.11.0-rc.6/deploy/deploy.yaml -o deploy.yaml
# Edit deploy.yaml (change resources, env vars, etc.)
kubectl apply -f config.yaml
kubectl apply -f deploy.yaml

Environment variablesโ€‹

VariableDefaultDescription
CONFIG_FILE/config/config.yamlPath to the config file
POD_NAMESPACE(field ref)Used for ConfigMap state access
GOMEMLIMIT(resource field ref)Go memory limit (soft)

โœ… Verifying the installationโ€‹

Check pod statusโ€‹

kubectl get pods -n kwatch -o wide

The container (kwatch) should be Running and Ready 1/1.

Check health endpointโ€‹

kubectl port-forward -n kwatch deployment/kwatch 8060:8060 &
curl http://localhost:8060/healthz
# ok
curl http://localhost:8060/readyz
# ok
curl http://localhost:8060/health
# {"status": "ok"}

View active incidentsโ€‹

# Requires diagnostics: true in config
curl http://localhost:8060/incidents
# [] (empty array = all clear)

Check Prometheus metricsโ€‹

curl http://localhost:8060/metrics | grep kwatch

โฌ†๏ธ Upgradingโ€‹

Upgrading within a release lineโ€‹

  1. Check the changelog and the release notes
  2. Update config if needed (deprecated Ignore* fields โ†’ silences)
  3. Upgrade via Helm or re-apply deploy.yaml

๐Ÿงน Clean upโ€‹

Helmโ€‹

helm uninstall kwatch --namespace kwatch
kubectl delete namespace kwatch

kubectlโ€‹

kubectl delete -f https://raw.githubusercontent.com/abahmed/kwatch/v0.11.0-rc.6/deploy/config.yaml
kubectl delete -f https://raw.githubusercontent.com/abahmed/kwatch/v0.11.0-rc.6/deploy/deploy.yaml