{"id":19939432,"url":"https://github.com/max-rocket-internet/kube-doctor","last_synced_at":"2025-10-09T23:07:23.541Z","repository":{"id":190186384,"uuid":"682064774","full_name":"max-rocket-internet/kube-doctor","owner":"max-rocket-internet","description":"Is your Kubernetes cluster unhealthy? Maybe it needs a checkup 🏥","archived":false,"fork":false,"pushed_at":"2025-04-17T07:26:40.000Z","size":470,"stargazers_count":20,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-17T22:17:42.805Z","etag":null,"topics":["cli","kubernetes","monitoring"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/max-rocket-internet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-23T11:09:37.000Z","updated_at":"2025-04-17T07:26:43.000Z","dependencies_parsed_at":"2024-01-13T04:11:39.966Z","dependency_job_id":"ba2cfc10-9592-4682-8735-343d897d6623","html_url":"https://github.com/max-rocket-internet/kube-doctor","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.09999999999999998,"last_synced_commit":"e1a2353946088bc656547c240dc1b93785664f51"},"previous_names":["max-rocket-internet/kube-doctor"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max-rocket-internet%2Fkube-doctor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max-rocket-internet%2Fkube-doctor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max-rocket-internet%2Fkube-doctor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/max-rocket-internet%2Fkube-doctor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/max-rocket-internet","download_url":"https://codeload.github.com/max-rocket-internet/kube-doctor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252210646,"owners_count":21712242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","kubernetes","monitoring"],"created_at":"2024-11-12T23:46:21.677Z","updated_at":"2025-10-09T23:07:18.500Z","avatar_url":"https://github.com/max-rocket-internet.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🩺 kube-doctor\n\n[![](img/k8s-logo-sick.png)](#)\n\n[![license](https://img.shields.io/github/license/sebasrp/awslimitchecker)](https://tldrlegal.com/license/mit-license)\n[![go Report Card](https://goreportcard.com/badge/github.com/max-rocket-internet/kube-doctor)](https://goreportcard.com/report/github.com/max-rocket-internet/kube-doctor)\n\nIs your Kubernetes cluster unhealthy? Do your workloads have symptoms? Then maybe it needs a checkup with `kube-doctor` 🏥\n\n```console\n$ kube-doctor --warning-symptoms --non-namespaced-resources\n== Checking DaemonSet resources\n👀 DaemonSet kube-system/efs-csi-node: efs-plugin no resources specified\n== Checking Deployment resources\n👀 Deployment opencost/opencost: container 'opencost' memory request and limit are not equal\n👀 Deployment default/application-one-listener: 5/8 pods are not ready\n== Checking Endpoint resources\n❌ Endpoint default/application-two: no ready addresses in subsets\n== Checking Event resources\n❌ Event datadog/datadog-x62q2: (Pod) 43.4 minutes ago: network is not ready: container runtime network not ready: NetworkReady=fals...\n❌ Event default/application-one-597f47458c-fdb4r: (Pod) 1.6 minutes ago: Back-off restarting failed container\n❌ Event datadog/datadog-95q6n: (Pod) 18.6 minutes ago: deleting pod for node scale down\n❌ Event ip-10-10-10-10.compute.internal: (Node) 9.5 minutes ago: marked the node as toBeDeleted/unschedulable\n❌ Event kube-system/cluster-autoscaler-status: (ConfigMap) 26.6 minutes ago: Scale-down: node ip-10-10-10-20.compute.internal removed with drain\n== Checking HorizontalPodAutoscaler resources\n👀 HorizontalPodAutoscaler default/application-three: has condition ScalingActive=False and reason ScalingDisabled\n👀 HorizontalPodAutoscaler default/application-four: has condition ScalingLimited=True and reason TooFewReplicas\n== Checking Job resources\n❌ Job production/train-model: BackoffLimitExceeded: Job has reached the specified backoff limit\n❌ Job production/run-analysis: DeadlineExceeded: Job was active longer than specified deadline\n== Checking PersistentVolume resources\n❌ PersistentVolume pgwatch-storage-pv-database: older than 5 minutes and status is not bound\n== Checking Pod resources\n❌ Pod default/application-two-uje-h2bhq: not running\n❌ Pod datadog/datadog-555h5: status condition Ready is False\n❌ Pod default/application-six: container 'app' was restarted 3.1 mins ago: 1 (exit code) Error (reason)\n👀 Pod default/application-two-lhu-4r7hn: container 'app' has been restarted 5 times\n== Checking Service resources\n🎉 No symptoms found\n== Checking PersistentVolume resources\n⭕️ No resources found\n== Checking KubeApiHealthEndpointStatus resources\n🎉 No symptoms found\n```\n\nThis tool will check for the following symptoms:\n\n- `Container`:\n  - no resources specified\n  - no memory resources specified\n  - no memory limit\n  - memory request and limit are not equal\n- `DaemonSet`:\n  - pods are not ready\n  - pods are miss-scheduled\n  - rolling update in progress\n- `Deployment`:\n  - minimum availability not met\n  - ReplicaSet update in progress\n  - ReplicaSet update in progress but no progress\n- `Endpoint`:\n  - no ready addresses in subsets\n- `Event`:\n  - `cluster-autoscaler` events that are:\n    - events that are not `Type=Normal`\n    - `ScaleUp` and `ScaleDown` events\n  - `service-controller` events that are not `Type=Normal`\n  - `default-scheduler` events that are not `Type=Normal` and not `Reason=FailedScheduling`\n  - `kubelet` events that are not `Type=Normal` and not `Reason=Unhealthy`\n- `HorizontalPodAutoscaler`:\n  - various bad status conditions\n- `Job`:\n  - `Failed` jobs within last hour\n- [Kubernetes API health endpoints](https://kubernetes.io/docs/reference/using-api/health-checks/):\n  - any bad or unknown checks\n- `Node`:\n  - mixed kubelet versions\n  - not `Ready`\n  - older than 5 minutes and not `Ready`\n  - any bad status conditions\n- `PersistentVolumeClaim` \u0026 `PersistentVolume`\n  - older than 5 minutes and not in `Bound` phase\n- `Pod`:\n  - phase that is not `Running`\n  - any bad pod status conditions\n  - various bad container status conditions\n  - crashed containers in last hour\n  - without owner (created from `kubectl run`)\n- `Service`:\n  - `LoadBalancer` type without bad status\n\n## Running\n\nBy default `kube-doctor` will check all namespaces but it can also target a specific namespace:\n\n```console\nkube-doctor --namespace kube-system\n```\n\nOr label selector;:\n\n```console\nkube-doctor --label-selector app.kubernetes.io/name=prometheus\n```\n\nOr a combination of both:\n\n```console\nkube-doctor --label-selector app.kubernetes.io/name=prometheus --namespace monitoring\n```\n\nNon-namespaced resources like nodes can be checked with the `--non-namespaced-resources` flag:\n\n```console\nkube-doctor --non-namespaced-resources\n```\n\nTo see other options, including debug logging, consult the help:\n\n```console\nkube-doctor --help\n```\n\n## Installation\n\nCheck out code and build:\n\n```console\ngit clone git@github.com:max-rocket-internet/kube-doctor.git\ncd kube-doctor\ngo build ./... \u0026\u0026 go install ./...\n```\n\nRun from `main` branch without `git`:\n\n```console\ngo install github.com/max-rocket-internet/kube-doctor@latest\ncd $GOPATH/pkg/mod/github.com/max-rocket-internet/kube-doctor*/\ngo run main.go\n```\n\nTo download a binary, check [the releases](https://github.com/max-rocket-internet/kube-doctor/releases).\n\n## Contributing\n\nPull requests welcome 💙\n\nTo run all tests:\n\n```console\ngo test ./...\n```\n\nOr just a single package:\n\n```console\ngo test ./.../checkup\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmax-rocket-internet%2Fkube-doctor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmax-rocket-internet%2Fkube-doctor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmax-rocket-internet%2Fkube-doctor/lists"}