> For the complete documentation index, see [llms.txt](https://docs.ilert.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ilert.com/integrations/inbound-integrations/kubernetes.md).

# Kubernetes Integration

Feed Kubernetes cluster alerts into ilert to notify on-call teams about pod failures, resource limits, or cluster health issues fast.

The[ Kubernetes](https://kubernetes.io/) integration brings cluster metrics, such as pod crashes, high CPU/memory usage, or node failures, from Prometheus-based systems into ilert as technical alerts. On-call responders receive these alerts with context for prompt triage and remediation in containerized environments.

## In ilert: Create a Kubernetes alert source <a href="#in-ilert" id="in-ilert"></a>

1. Go to **Alerting** → **Alert sources** and click **Create new alert source**.
2. Search for **Kubernetes**, click its tile, and click **Next**.
3. Give your alert source a name, optionally assign teams, and click **Next**.
4. Choose who gets notified: select **Use existing escalation policy** and pick a policy, or **Generate new escalation policy** to start with a basic one that notifies you first. Click **Next**.

   <figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fgit-blob-8a281bf3931f5a1a531951ce97984d50989dd875%2Falert-source-escalation-step.png?alt=media" alt="The escalation step of the ilert alert source wizard, headed Who should be notified about alerts, with an escalation policy selected and a preview of its escalation rules below."><figcaption><p>Pick an existing escalation policy, or generate a basic one without leaving the wizard.</p></figcaption></figure>
5. Select **Default grouping** and click **Continue setup**. It groups events by the alert key the integration sets; the other [grouping options](/alerting/configure-alerting/alert-sources.md#event-grouping) are easier to judge once events are arriving.
6. The next page shows more settings, such as notification priority and alert templates. Click **Finish setup** for now; you can change them later.
7. On the final page, ilert shows the integration key and URL for this alert source. You will need them later in this guide.

## In Kubernetes <a href="#in-kubernetes" id="in-kubernetes"></a>

### a. Deploy [ilert-kube-agent](https://github.com/iLert/ilert-kube-agent) with helm (recommended) <a href="#deploy-a" id="deploy-a"></a>

1. Add helm charts repo and update it

```
helm repo add ilert https://ilert.github.io/charts/
helm repo update
```

2. 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](https://github.com/iLert/ilert-kube-agent) with terraform (recommended) <a href="#deploy-b" id="deploy-b"></a>

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>"
}
```

2. Apply changes

```
terraform init
terraform apply
```

### c. Deploy [ilert-kube-agent](https://github.com/iLert/ilert-kube-agent) with manifest <a href="#deploy-c" id="deploy-c"></a>

1. Clone the ilert-kube-agent repository

```
git clone https://github.com/iLert/ilert-kube-agent.git
```

2. Paste the API Key that you generated in ilert into *./example/standard/30-deployment.yaml*

```
...
          env:
            ...
            - name: ILERT_API_KEY
              value: "<YOUR KEY HERE>"
...
```

3. Apply the deployment manifest to your kubernetes cluster

```
kubectl apply -f deployment/standard/
```

4. 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
```

5. Finished! Your Kubernetes alerts will now create alerts in ilert.

## FAQ <a href="#faq" id="faq"></a>

**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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ilert.com/integrations/inbound-integrations/kubernetes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
