Kubernetes alerts

Kubernetes pod failure alerts to your phone.

Pipe pod crashes, OOMKills, and failed deployments to an encrypted push channel. No dashboards to babysit.

Why Nerve for Kubernetes

Most Kubernetes monitoring stacks give you dashboards and email digests. Nerve gives you an encrypted push alert on your phone the moment a pod dies — from a one-line shell command, not a YAML-heavy operator.

The sender DSN you store in your cluster can only send signals into one pipe. If it leaks, it cannot read your alert history or run commands on your infrastructure.

Watch failed pods with kubectl

The simplest approach: a kubectl one-liner that watches for pod failures and pipes them to Nerve.

kubectl get events --field-selector reason=Failed --watch-only \
  -o custom-columns=MSG:.message --no-headers \
  | while read -r line; do echo "$line" | nerve send; done

CronJob: periodic pod health check

Run a Kubernetes CronJob every 5 minutes that checks for crashing pods and sends a summary.

apiVersion: batch/v1
kind: CronJob
metadata:
  name: nerve-pod-check
spec:
  schedule: "*/5 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: check
            image: bitnami/kubectl:latest
            env:
            - name: NERVE_DSN
              valueFrom:
                secretKeyRef:
                  name: nerve-credentials
                  key: dsn
            command:
            - /bin/sh
            - -c
            - |
              CRASHED=$(kubectl get pods --all-namespaces \
                --field-selector=status.phase=Failed -o name)
              if [ -n "$CRASHED" ]; then
                echo "crashed pods: $CRASHED" | nerve send --severity critical
              fi
          restartPolicy: Never

Store the DSN as a Kubernetes secret

kubectl create secret generic nerve-credentials \
  --from-literal=dsn="nerve://TOKEN:[email protected]"

OOMKill alerts

OOMKilled containers often restart silently. Catch them before they cascade.

kubectl get events --field-selector reason=OOMKilling --watch-only \
  -o custom-columns=MSG:.message --no-headers \
  | while read -r line; do echo "OOMKill: $line" | nerve send --severity critical; done

Deployment rollout failures

kubectl rollout status deployment/my-app --timeout=120s \
  || echo "Rollout failed: my-app" | nerve send --severity critical

FAQ

Can Nerve replace PagerDuty for Kubernetes alerts?

Nerve is not an incident management platform. It is a lightweight encrypted push channel for pod failures, OOMKills, and deployment events that you pipe from kubectl, CronJobs, or CI scripts.

How do I send Kubernetes alerts to Nerve?

Use kubectl or a CronJob to watch for failed pods and pipe the output to nerve send. Store your Nerve DSN as a Kubernetes secret.

Are Kubernetes alerts encrypted in Nerve?

Yes. Signal payloads are encrypted before they reach the Nerve relay. The sender DSN cannot read history or execute commands.