8000 GitHub - abahmed/kwatch at v1.0.0-rc.11 Β· GitHub
[go: up one dir, main page]

Skip to content
abahmedPublic

About

kwatch runs inside your Kubernetes cluster, traces every failure to its root cause, and sends one message: what broke, why, who changed it and what to do next.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1.0k stars

Watchers

9 watching

Forks

Latest commit

Β 

History

319 Commits

Folders and files

Repository files navigation

kwatch

Stop reading alerts. Start fixing the cause.

kwatch is the on-call teammate for your Kubernetes cluster. When something breaks, it finds the one thing that caused it and tells your team in plain words, with the command to fix it.

Get started Β· Website Β· Docs Β· Discord

Release Stars CI License


😩 2:14 AM. Your phone lights up twenty times.

A release went out. Now pods are crash looping, a Service has no endpoints, the Ingress returns 503s, and two other apps are failing their health checks. Every alert is true. None of them tells you why. So you open a terminal and start digging.

😌 With kwatch, you get one message

Typical alerts without kwatch With kwatch
πŸ”₯ Pod api-7d9f-x2k CrashLoopBackOff
πŸ”₯ Pod api-7d9f-q8n CrashLoopBackOff
πŸ”₯ Pod api-7d9f-m4c CrashLoopBackOff
⚠️ Service api has no endpoints
⚠️ Ingress storefront 503
πŸ”₯ Pod checkout-5b2c-p1z Readiness failed
πŸ”₯ Pod checkout-5b2c-k7w Readiness failed
... 13 more
πŸ”΄ api is down in shop after the
14:02 release of api:2.3. alice
released it; the previous image was
api:2.2. Only pods of the new
revision fail. Service api and
ingress storefront can't serve traffic.
checkout is affected as well. Rolling
back fixes it (changes the cluster):
kubectl rollout undo deployment/api
-n shop --to-revision=13

What broke, why, who changed it, what else is hit, and how to fix it, in one message, before you have even opened your laptop. When it is fixed, you hear about it once:

βœ… api in shop (prod-eu-1) is healthy again. It was down for eight
minutes.

✨ Why teams pick kwatch

🎯 The cause, not the symptoms

kwatch follows a failure back through everything it depends on, and names the root: a bad release, a full node, an expired certificate, a database outside the cluster. Twenty symptoms become one incident.

πŸ”• Quiet by default

Successful rollouts, scaling, node drains, finished Jobs and the odd pod restart never wake anyone. Updates are sent only when something new is true. A storm of 1,000 failing pods from one cause is at most 3 messages.

🧠 Knows what changed

Every rollout, config edit and image update goes on a timeline with who made it, so the message can say "after alice's 14:02 release". It even remembers changes made while kwatch itself was restarting.

πŸ› οΈ Tells you what to run

Each message ends with the next step: the exact kubectl command to read the crash log, describe the node, or roll back. New team members can act on it without knowing the cluster.

🌐 Sees the whole cluster

Every Kubernetes resource, Gateway API, snapshots and your own CRDs, with the links between them. If it has a status, kwatch understands it.

πŸ”’ Yours, in your cluster

One small Pod, read-only access, no account, no SaaS. Your cluster data never leaves your cluster except as the alerts you configure.

βš™οΈ How it works

flowchart LR
  A["πŸ‘€ Watch<br/>every resource<br/>and every change"] --> B["🩺 Detect<br/>what is unhealthy"]
  B --> C["🎯 Explain<br/>follow failures upstream<br/>to the fewest causes"]
  C --> D["πŸ“¨ Tell<br/>one message per cause,<br/>update only on news"]
Loading
  1. Watch. kwatch keeps a live map of your cluster: every object, how they connect, and a timeline of what changed and who changed it.
  2. Detect. It spots what is unhealthy: crash loops, unready nodes, Services with no endpoints, full volumes, failing webhooks and more.
  3. Explain. From each failure it walks to what it depends on and keeps only suspects that are broken or changed just before. Then it picks the fewest causes that explain everything.
  4. Tell. One message per cause, written for people. It is updated only when something new is true, and closed once when it is fixed.

πŸ’¬ More real messages

When five apps fail because a database outside the cluster is down, kwatch blames the database, not the apps:

πŸ”΄ api in shop is crash looping because external endpoint db.example.com:5432
refuses connections. It fails with "dial tcp db.example.com:5432: connect:
connection refused". Every error mentions it. cart, search, auth and one other
are affected as well. To read the output of the last crash, run
kubectl logs api-6d4f-0 -c app -n shop --previous

When a node disappears:

πŸ”΄ Node n1 (prod-eu-1) has not reported for two minutes. To check the node's
conditions and recent events, run kubectl describe node n1

When kwatch is not sure, it says so instead of guessing. One emoji tells you how urgent it is: πŸ”΄ page Β· 🟠 notify Β· 🟑 low Β· βœ… resolved.

πŸš€ Get started in one command

/bin/bash -c "$(curl -fsSL https://kwatch.dev/kwatch.sh)"

The installer asks which cluster and which channel (Slack, Teams, PagerDuty, …), stores the credentials in a Kubernetes Secret, installs kwatch and checks that it is running. Run it again any time to upgrade, change settings or uninstall.

Prefer Helm? helm repo add kwatch https://kwatch.dev/charts, then follow the chart guide.

πŸ“£ Alerts where your team already is

56 destinations, including Slack, Microsoft Teams, Discord, Google Chat, Mattermost, Telegram, email, PagerDuty, Opsgenie, incident.io, Jira, Datadog and plain webhooks. Paging tools get a stable key, so the same problem always updates the same page and closes it when it is fixed. See all channels β†’

πŸ” What it catches

πŸ“¦ Apps Crash loops, OOM kills, bad rollouts, stuck Jobs and CronJobs, missing replicas
πŸ—“οΈ Scheduling Pods that cannot be placed, quota limits, affinity and taint mismatches
πŸ–₯️ Nodes Lost or not-ready nodes, memory, disk and PID pressure
🌐 Network Services without endpoints, broken Ingress and Gateway routes, failing webhooks, unreachable external endpoints
πŸ’Ύ Storage Volumes filling up, failed attachments, stuck claims
πŸ” Config Missing or rotated Secrets and ConfigMaps, image pull failures, expiring certificates
🧩 Your CRDs Anything that reports standard status conditions

Full coverage list β†’

πŸ“ Tested like a product, not a script

Every change to kwatch is replayed against a library of real failure scenarios, plus a hidden set nobody is allowed to tune for. The build fails if it gets worse:

We promise And CI checks
It names the right cause β‰₯ 90% of scenarios, β‰₯ 80% of the hidden set
It rarely claims a wrong cause with confidence ≀ 5%
It never alerts on normal operations 0 alerts
It is fast page in ≀ 2 min, notify in ≀ 5 min
It stays small 5,000 pods and 500 nodes in 512 MiB of memory

Latest scorecard β†’

❓ FAQ

Does it replace Prometheus or Grafana?

No. kwatch answers "what just broke and why". Keep Prometheus, Grafana and Loki for metrics, trends and dashboards; kwatch needs no rules and works next to them.

Does my data leave the cluster?

Only as the alerts you configure. Secrets and tokens are redacted from logs and messages. kwatch also sends a weekly anonymous ping (a hashed cluster ID and its version, nothing else) so we know how many clusters use it; turn it off with telemetry.enabled: false.

What access does it need?

Read-only access to cluster state. It writes only its own Lease, its state file, and SelfSubjectAccessReviews for its permission audit (not persisted). It never gets pods/exec or nodes/proxy. A least-privilege mode and a watch.secrets: false opt-out are available.

How much does it cost to run?

kwatch is free to use in your own clusters. It runs as one Pod with a 512 MiB memory limit and a 2 GiB volume for its state.

What happens when kwatch restarts?

It picks up where it left off: open incidents are not announced again, queued alerts are still sent, and changes made while it was down are still used to explain failures. It runs as one replica (no HA) and delivers alerts at least once. See production operations.

Can I tune what it sends?

Yes: namespace filters, silences, maintenance annotations, severity overrides, runbook links, an hourly message budget per channel, and configuration through a KwatchConfig resource (kwatch restarts to apply it). See the configuration guide.

🀝 Join us

kwatch is built in the open. Report a bug, suggest an idea, or send a pull request. New contributors can start with the plain-English architecture guide and step-by-step guides for adding a detector, a propagation rule or a scenario.

Open an issue Β· Join Discord Β· CONTRIBUTING.md

If kwatch saves you a night, ⭐ the repo so others can find it.

πŸ“„ License

Source available under the Elastic License 2.0: use it free in your own clusters, read and change the code, and share it. You may not offer kwatch as a hosted service or remove its license checks. Releases up to and including v1.0.0-rc.10 remain under the MIT License. See licensing.

About

kwatch runs inside your Kubernetes cluster, traces every failure to its root cause, and sends one message: what broke, why, who changed it and what to do next.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1.0k stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0