DumbMonit

IntegrationenVirtualisierung und Container

Kubernetes / k3s überwachen mit DumbMonit

A cluster through its API: nodes not ready or under pressure, pods crash looping or stuck pending, workloads missing replicas, volume claims never bound.

DokumentationOffizielle Website: Kubernetes

Die Produktbeschreibungen sind englisch, wie im Produkt. Die Beschriftungen der Seite folgen Ihrer Sprache.

Was DumbMonit überwacht

A cluster through its API server: nodes that are not Ready or under pressure, pods crash looping or stuck Pending, Deployments, StatefulSets and DaemonSets missing replicas, volume claims that never get bound, and the warning events of the last hour.

Typischer Einsatz. Cluster: nodes not ready, pods crash looping or pending, workloads missing replicas, stuck volume claims

Beispiele

  • k3s
  • kubeadm cluster
  • k0s
  • MicroK8s
  • Talos

Wie die Verbindung läuft

Was Sie brauchen

  • Service account tokenThe token of the dumbmonit service account, read from its dumbmonit-token Secret.

Zu öffnende Netzwerk-Ports

  • 6443/TCPAPI server (HTTPS, default)
Einrichtungsschritte: Create a read-only service account for DumbMonit
  1. Create the service account.

    kubectl create serviceaccount dumbmonit -n kube-system
  2. Create a ClusterRole that can only get and list what DumbMonit reads.

    kubectl create clusterrole dumbmonit-read --verb=get,list --resource=nodes,pods,persistentvolumeclaims,events,deployments.apps,statefulsets.apps,daemonsets.apps
  3. Bind the role to the service account.

    kubectl create clusterrolebinding dumbmonit-read --clusterrole=dumbmonit-read --serviceaccount=kube-system:dumbmonit
  4. Create a token that does not expire, then print the token and the cluster CA in base64.

    echo '{"apiVersion":"v1","kind":"Secret","metadata":{"name":"dumbmonit-token","namespace":"kube-system","annotations":{"kubernetes.io/service-account.name":"dumbmonit"}},"type":"kubernetes.io/service-account-token"}' | kubectl apply -f -
    kubectl -n kube-system get secret dumbmonit-token -o jsonpath='{.data.token}' | base64 -d
    kubectl -n kube-system get secret dumbmonit-token -o jsonpath='{.data.ca\.crt}'
  5. In DumbMonit, enter the API server address (for example https://k3s.lan:6443), paste the token as Service account token and the CA as Cluster CA certificate.

Hinweis. On k3s, run each command as sudo k3s kubectl. The API server certificate only lists its own names and addresses: use one it lists, or tick Accept an unverifiable certificate.