Skip to content

Troubleshooting

Bot doesn't respond to @karakuri

  • The bot user must be invited to the channel.
  • The channel must be in slack.allowed_channels.
  • Check Event Subscriptions has the app_mention bot event and Socket Mode is on.
  • docker compose logs -f agent — look for starting socket mode handler.

@karakuri selftest fails

Read which check failed: - cluster reach → the context in config.yaml isn't reachable from the container (kubeconfig not mounted, or kind server points at 127.0.0.1 — see Deployment → local kind). - LLM ping → wrong/missing provider key, or llm.provider doesn't match the key you set. - Slack auth → bad SLACK_BOT_TOKEN. - audit channel → bot not invited to slack.audit_channel.

No restart alerts appear

  • The cluster needs auto_watch: true.
  • The namespace must not be in watcher.ignore_namespaces.
  • rate_limit_per_pod_per_hour caps diagnoses per pod (default 3).
  • The agent must be watching the same cluster the pod runs on (the kubeconfig context Karakuri uses, not necessarily your local default context).
  • Check metrics: karakuri_restart_detected_total should increment.

A card button says "isn't allowed to run this here"

Two gates, either one is enough:

  • the clicking user's Slack user ID in slack.allowed_users (IDs like U12345, not display names), or
  • the channel the card was posted in listed in slack.allowed_channels.

slack.allowed_channels gates card buttons as well as @mentions, and entries may be a channel name (devops-bot), a #name (#devops-bot) or a channel ID (C0123ABC, what Slack's "Copy link" gives you). Matching ignores case and surrounding whitespace.

Names work in private channels and DMs too. Slack sends no real name in a button click from those (the payload carries the literal privategroup or directmessage), so Karakuri looks the name up with conversations_info. That needs the bot in the channel and the groups:read scope, both of which the app manifest and the invite step already cover.

Cards are posted to clusters.<name>.notify_channel, which is a separate key from slack.allowed_channels. A notify_channel that is not allow-listed produces cards whose buttons refuse every click, unless the tester is in slack.allowed_users. Karakuri logs a warning for that combination at startup, and @karakuri selftest reports it as the card-buttons check.

The refusal message itself names the user, the channel (name and ID) and the key to edit. If it says Karakuri couldn't read the channel name, the conversations_info lookup failed (missing channels:read / groups:read scope, or a transient Slack error). Until that is fixed, only slack.allowed_users or a channel ID in slack.allowed_channels can match.

"invalid signature" on a button

BUTTON_SIGNING_SECRET changed (or differs between the poster and handler). Keep it stable; rotating it invalidates buttons on already-posted cards.

The ⋯ overflow menu carries a signed value too, so the menu on a card posted before that shipped answers the same way. Act on the newest card, or use one of the buttons on the old one.

LLM returns rate-limit (429) errors

  • Groq's free tier is easily exhausted — switch llm.provider to openrouter.
  • The client retries transient 5xx/429 with backoff automatically; persistent 429 means the provider/plan is the limit.

docker pull ghcr.io/clouddrove/karakuri → denied

The image is private. docker login ghcr.io with a token that has read:packages, or make the GHCR package Internal / grant repo read.

Diagnosis fix targets the pod instead of the workload

Karakuri resolves the owning controller and instructs the LLM to target deploy/… etc. If you see a pod-targeted fix, check the controller chain resolved (Controlled By in kubectl describe pod).

Watchers fail with "Missing Authority Key Identifier" / no alerts on EKS

Logs show SSLCertVerificationError ... certificate verify failed: Missing Authority Key Identifier and every watcher backs off — the bot connects to Slack but monitors nothing. Cause: Python 3.14 enables ssl.VERIFY_X509_STRICT by default and the EKS API-server CA omits the AKI extension. Fixed in app ≥ 0.1.7 (incluster._relax_x509_strict); upgrade the image. Confirm via the karakuri_watcher_connected metric (0 = blind) / the KarakuriWatcherBlind alert.

Button shows a ⚠️ / "blocked by policy: cluster '' not in allowlist"

The card's cluster isn't a clusters: key in the running instance's config — usually a stale card from before a restart or a config/cluster-key change. The allowlist is exactly set(config.clusters.keys()). Check the live config: helm get values <release> -n <ns> → config.clusters. Make the key match what cards show. App ≥ 0.1.10 replaces the bare ⚠️ with a readable "stale card" notice.

Flood of alerts right after every deploy

Alert/dedup state is in-memory, so a restart re-detects every currently-broken resource. App ≥ 0.1.10 suppresses this: during STARTUP_BASELINE_SECONDS (default 300) pre-existing problems fold into one summary per cluster instead of a card each in the channel. When the window closes, each one still open gets its normal card (with Apply, Investigate and resolve) in that summary's thread, up to 20; the rest stay listed in the summary. Raise/lower the window via the env var if needed.

Too many alerts from a CronJob or Job

From 0.1.35 a Job only alerts when Kubernetes marks it Failed, or when its pod is stuck on a bad image or missing Secret. If you still see a card per pod, check watcher.check_jobs is not false and the image is 0.1.35 or newer.

To silence one CronJob or Job entirely:

kubectl -n <namespace> annotate cronjob <name> karakuri.clouddrove.com/ignore=true

It must be on the CronJob's own metadata (Kubernetes does not copy it to the Jobs, Karakuri follows the owner chain instead). If the annotation seems ignored, check Karakuri can get CronJobs and Jobs in that namespace: when it cannot read them it alerts rather than stay quiet. For a whole namespace use watcher.ignore_namespaces. See Usage: Jobs and CronJobs.

Tests / local Python

There is no host Python setup — run tests in Docker:

docker compose -f docker-compose.test.yml run --rm agent

The host interpreter is intentionally unused (provider deps live only in the image).

Still stuck? Open an issue (redact tokens/cluster names) — see CONTRIBUTING.md. For vulnerabilities, SECURITY.md.