Open-source Kubernetes operator

Uptime monitoring for every Ingress in your cluster

Begira finds every Ingress and HTTPRoute in the cluster and checks its public URL once a minute. It alerts you when a URL goes down or its TLS certificate is 14 days from expiry, and you never maintain a list of URLs to check.

View on GitHub
helm install begira oci://ghcr.io/begira/charts/begira -n begira --create-namespace
  • Apache-2.0
  • No account or API key
  • Helm chart or one manifest

prod-eu Sample data

4 Ingresses · 4 monitors

  • shop.acme.exampledeleted Down
  • api.acme.exampledeleted 41 ms Up
  • auth.acme.exampledeleted 58 ms Up
  • docs.acme.exampledeleted New No monitor
  • old-promo.acme.exampledeleted Removed Still alerting

User path to shop.acme.example · DNS lookup failed

  1. Begira
  2. NAT
  3. DNS
  4. LB
  5. TLS
  6. Ingress

shop.acme.example is down. Alert sent.

Works with

  • Kubernetes Ingress
  • Gateway API
  • Helm
  • Prometheus
  • Alertmanager
  • Slack

Setup in three steps

You install Begira once. From then on it checks every Ingress that exists or is created later, and it stops checking an Ingress when you delete it.

  1. Install the operator

    Install the Helm chart, or apply one manifest with kubectl apply. Begira gets read-only access to Ingresses and HTTPRoutes and never changes them.

    helm install begira \
      oci://ghcr.io/begira/charts/begira \
      -n begira --create-namespace
  2. Create an Ingress

    Begira starts checking a new Ingress within seconds. For the first 5 minutes it ignores failures on a new host, because the DNS record and certificate may not exist yet.

    kubectl -n web create ingress shop \
      --rule="shop.acme.example/*=shop:80"
  3. Receive alerts

    Every change of state becomes an Event on the Ingress. Begira also sends it to Slack and Alertmanager when you configure them.

    # Events on the Ingress
    Warning  ProbeDown  begira
      https://shop.acme.example/ is down

What Begira checks

Begira runs each check itself, from inside the cluster, and keeps the set of checked URLs equal to the set of Ingress hosts.

The path a user's request takes

Each check leaves the cluster through the NAT gateway, resolves the public DNS name, and comes back in through the load balancer, TLS and the ingress controller. A check against the internal Service would still pass with any of these steps broken.

  1. Begira pod
  2. NAT gateway
  3. Public DNS
  4. Load balancer
  5. TLS
  6. Ingress controller
  7. Your app

Certificate expiry

Begira verifies the certificate chain that the server presents and alerts 14 days before the first certificate in it expires. The check covers intermediate certificates, which can expire before the leaf certificate.

shop.acme.example61 days
api.acme.example9 days
Sample data

Down after 3 failed checks

Begira marks a URL as down after 3 failed checks in a row, spread over at least two check intervals. Until then the URL shows as pending, and Begira sends no alert.

  1. Up10:40200 OK
  2. 1/310:41timed out
  3. 2/310:42timed out
  4. Down10:43alert sent

Prometheus metrics

Begira exports four metrics per URL, each labeled with its Ingress: up, response time, status code and certificate expiry. Prometheus scrapes them like any other target, so existing dashboards and alert rules can use them.

begira_probe_up{url="https://shop.acme.example/",ingress="web/shop"} 1
begira_probe_duration_seconds{url="…",ingress="web/shop"} 0.092
begira_probe_status_code{url="…",ingress="web/shop"} 200
begira_cert_expiry_timestamp_seconds{url="…"} 1.79e+09

Created and deleted Ingresses

Begira adds an Ingress's URLs when the Ingress is created. It removes them, with their metrics, when the Ingress is deleted, so no alert fires for a site that no longer exists. The annotation begira.dev/ignore excludes an Ingress.

  • Ingress createdChecked in seconds
  • Ingress deletedRemoved
  • begira.dev/ignore: "true"Skipped

Restarts and wide outages

  • Alert state lives in a ConfigMap, so a restart or upgrade does not send the same alert twice.
  • When most URLs fail at once, for example because egress is down, Begira sends a single alert that it cannot reach most URLs.
  • Checks never go to link-local addresses, so an Ingress cannot point Begira at the cloud metadata service.

Alert channels

Begira alerts when a URL goes down, when it recovers, and when its certificate enters the 14-day warning window. Each alert names the cause, such as "DNS lookup failed" or "Connection refused".

Begira APP 10:42

DOWN shop.acme.example

Ingress
web/shop
Cause
DNS lookup failed
Failed checks
3 in a row
Cluster
prod-eu
lookup shop.acme.example: no such host

Sample data

Status page

Begira serves a read-only status page for its cluster. The page lists every URL with its state, failure cause and response time, and you open it with a port-forward.

kubectl -n begira port-forward \
  svc/begira-status 8090:80
Begira's status page: the verdict '1 of 5 URLs down', then a DOWN row (DNS lookup failed) and a PENDING row (TLS certificate expired) with their causes and latency.
Full screenshot · from the end-to-end test cluster

Comparison with other tools

Begira next to four tools that teams use to check Ingress URLs. The row on regions shows where Begira is weaker: it checks from one location only.

CapabilityBegiraStakater IMCUptime Kuma bridgesBlackbox ExporterUptimeRobot
Finds every Ingress by itself All, by defaultOne EndpointMonitor per IngressOpt-in annotationOne Probe per targetOnly via Stakater IMC
Runs the checks itself In your clusterNeeds a vendorNeeds Uptime KumaYesTheir SaaS
Checks the public URL Through NAT egressFrom the vendorYesYesYes
Prometheus metrics YesNoVia Uptime KumaYesNo
Checks from several regions No, one vantage pointFrom the vendorNoNoYes
Extra things to run or pay for NothingVendor account + API keyAn Uptime Kuma instancePrometheus Operator + hand-written ProbesAccount, priced per monitor

Limits

Because every check runs inside your cluster, Begira cannot detect two kinds of failure.

Failure of its own cluster

If the cluster, its nodes or the NAT gateway fail, Begira stops with them and cannot send an alert. Keep at least one check outside the cluster for this case.

Failures in other regions

Begira checks from one location. A failure that only affects users in another region, or behind one CDN edge, does not appear in its results.

Begira Cloud is a planned hosted service with a heartbeat and checks from outside the cluster. It is not built yet.

Questions

Something missing? Open an issue on GitHub.

Does any data leave my cluster?

Only the alerts you configure, sent to Slack or your Alertmanager. The checks go to your own public URLs, and nothing is sent to the Begira project.

What does Begira need access to?

Begira reads Ingresses, HTTPRoutes, Gateways and its ClusterUptimePolicy. It writes Events, and one ConfigMap in its own namespace that holds alert state. It never changes your Ingresses.

Do I need an account or an API key?

No. After you install the Helm chart or the manifest, Begira checks every Ingress it finds without further setup.

Does it support Gateway API?

Yes. Begira reads networking.k8s.io/v1 Ingresses and gateway.networking.k8s.io/v1 HTTPRoutes. It checks hosts with TLS over https and the others over http, and it skips wildcard hosts.

What about Traefik IngressRoute or OpenShift Routes?

Not yet. On those clusters Begira checks every host exposed through a standard Ingress or HTTPRoute. Discovery of IngressRoute and Route objects is on the roadmap.

How do I stop it checking one Ingress?

Add the annotation begira.dev/ignore: "true" to that Ingress. To check a different path, such as /healthz, set begira.dev/path.

Where do the settings live?

In one ClusterUptimePolicy named cluster. It holds the check interval (60s by default), timeout, retries (3), grace period (5 minutes), certificate warning window (14 days), proxy, Alertmanager URL and exclusions. Begira applies changes without a restart.

Will it work in a private cluster?

Yes, if Begira has egress to your public URLs through a NAT gateway or a proxy. With default-deny NetworkPolicies, read the Private clusters guide in the repository first.

What does it cost?

Nothing. Begira is open source under Apache-2.0 and has no limit on the number of URLs. A hosted Begira Cloud with a heartbeat and outside checks is planned and not built yet.

Install once, and every Ingress is checked

Begira is free and open source under Apache-2.0. It needs no account and has no limit on the number of URLs.

View on GitHub
helm install begira oci://ghcr.io/begira/charts/begira -n begira --create-namespace