Kubernetes Integration

With the ilert Kubernetes integration, you can create alerts in ilert based on Kubernetes events and metrics.

In ilert: Create a Kubernetes alert source

  1. Go to Alert sources --> Alert sources and click on Create new alert source

  2. Search for Kubernetes in the search field, click on the Kubernetes tile and click on Next.

  3. Give your alert source a name, optionally assign teams and click Next.

  4. Select an escalation policy by creating a new one or assigning an existing one.

  5. Select you Alert grouping preference and click Continue setup. You may click Do not group alerts for now and change it later.

  6. The next page show additional settings such as customer alert templates or notification prioritiy. Click on Finish setup for now.

  7. On the final page, an API key and / or webhook URL will be generated that you will need later in this guide.

In Kubernetes

a. Deploy ilert-kube-agent with helm (recommended)

  1. Add helm charts repo and update it

helm repo add ilert https://ilert.github.io/charts/
helm repo update
  1. Deploy ilert-kube-agent with the API Key that you generated in ilert

helm upgrade --install --namespace kube-system \
    ilert-kube-agent ilert/ilert-kube-agent \
    --set config.settings.apiKey="<YOUR KEY HERE>"

b. Deploy ilert-kube-agent with terraform (recommended)

  1. Define module and paste the API Key that you generated in ilert

module "ilert-kube-agent" {
  source  = "iLert/ilert-kube-agent/kubernetes"
  version = "0.3.9"
  replicas = 2
  api_key = "<YOUR KEY HERE>"
}
  1. Apply changes

terraform init
terraform apply

c. Deploy ilert-kube-agent with manifest

  1. Clone the ilert-kube-agent repository

git clone https://github.com/iLert/ilert-kube-agent.git
  1. Paste the API Key that you generated in ilert into ./example/standard/30-deployment.yaml

...
          env:
            ...
            - name: ILERT_API_KEY
              value: "<YOUR KEY HERE>"
...
  1. Apply the deployment manifest to your kubernetes cluster

kubectl apply -f deployment/standard/
  1. Verify that the ilert-kube-agent pods are running and ready

kubectl --namespace kube-system get pod -l app=ilert-kube-agent

NAME                               READY   STATUS    RESTARTS   AGE
ilert-kube-agent-64f7dfd4d-nsnzp   1/1     Running   0          37h
ilert-kube-agent-64f7dfd4d-zx7fb   1/1     Running   0          37h
  1. Finished! Your Kubernetes alerts will now create alerts in ilert.

FAQ

Will alerts in ilert be resolved automatically?

Yes, as soon as an alert has been resolved in ilert-kube-agent, the associated alert in ilert will be resolved automatically.

Can I connect multiple Kuberenetes namespaces with multiple alert sources from ilert?

Yes, simply create multiple deployments per namespace in Kubernetes.

Last updated