Skip to content

Instantly share code, notes, and snippets.

@karl-johan-grahn
Created July 7, 2020 20:11
Show Gist options
  • Select an option

  • Save karl-johan-grahn/e04b40cf991fff69a07ceb8a3f889dd4 to your computer and use it in GitHub Desktop.

Select an option

Save karl-johan-grahn/e04b40cf991fff69a07ceb8a3f889dd4 to your computer and use it in GitHub Desktop.
DifferentKubernetesVersions
count(count(kubernetes_build_info) by (gitVersion))>1
KubernetesNodeTooOld
(time() - kube_node_created) > (60 * 60 * 24 * 30)
KubernetesPodTooOld
(time() - (kube_pod_created * on (pod, namespace) group_left kube_pod_owner{owner_kind!="DaemonSet"})) > (60 * 60 * 24 * 16)
NoAvailableReplicas
((sum(kube_deployment_status_replicas_available) by (deployment) == 0) < sum(kube_deployment_spec_replicas) by (deployment))
or
((sum(kube_statefulset_status_replicas_ready) by (statefulset) == 0) < sum(kube_statefulset_status_replicas_current) by (statefulset))
PodDisruptionBudgetExhausted
(sum(kube_poddisruptionbudget_status_current_healthy) by (poddisruptionbudget)) / (sum(kube_poddisruptionbudget_status_desired_healthy) by (poddisruptionbudget)) < 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment