Grafana dashboard: Pod Statistic (Karpenter)
Description: Pods statistics for Karpenter

Dashboard showing pod distribution and resource consumption with multiple filters.

{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.2.5"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 16236,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1651873303436,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
      "description": "Total number of Pods",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 5,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "sum (karpenter_pods_state{namespace=~\"$namespace\", node=~\"$node\", zone=~\"$zone\", instance_type=~\"$instance_type\",  owner=~\"$owner\",  phase=~\"$phase\", arch=~\"$arch\", capacity_type=~\"$capacity_type\", provisioner=~\"$provisioner\"})",
          "interval": "",
          "legendFormat": "Number of Pods",
          "refId": "A"
        }
      ],
      "title": "Total number of Pods",
      "type": "timeseries"
    },
    {
      "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
      "description": "Pod Distribution by AZ",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 47,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 11,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "sum by (zone)(karpenter_pods_state{namespace=~\"$namespace\", node=~\"$node\", zone=~\"$zone\", instance_type=~\"$instance_type\",  owner=~\"$owner\",  phase=~\"$phase\", arch=~\"$arch\", capacity_type=~\"$capacity_type\", provisioner=~\"$provisioner\"})",
          "interval": "",
          "legendFormat": "{{zone}}",
          "refId": "A"
        }
      ],
      "title": "Pod Distribution by AZ",
      "type": "timeseries"
    },
    {
      "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
      "description": "Pod Distribution by Namespaces",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 47,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 9
      },
      "id": 8,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "sum by (namespace)(karpenter_pods_state{namespace=~\"$namespace\", node=~\"$node\", zone=~\"$zone\", instance_type=~\"$instance_type\",  owner=~\"$owner\",  phase=~\"$phase\", arch=~\"$arch\", capacity_type=~\"$capacity_type\", provisioner=~\"$provisioner\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "",
          "refId": "B"
        }
      ],
      "title": "Pod Distribution by Namespaces",
      "type": "timeseries"
    },
    {
      "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
      "description": "Pod Distribution by Node",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 47,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 9
      },
      "id": 12,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "sum by (node)(karpenter_pods_state{namespace=~\"$namespace\", node=~\"$node\", zone=~\"$zone\", instance_type=~\"$instance_type\",  owner=~\"$owner\",  phase=~\"$phase\", arch=~\"$arch\", capacity_type=~\"$capacity_type\", provisioner=~\"$provisioner\"})",
          "interval": "",
          "legendFormat": "{{node}}",
          "refId": "A"
        }
      ],
      "title": "Pod Distribution by Node",
      "type": "timeseries"
    },
    {
      "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
      "description": "Pod Distribution by Instance Type",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 47,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 18
      },
      "id": 13,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "sum by (instance_type)(karpenter_pods_state{namespace=~\"$namespace\", node=~\"$node\", zone=~\"$zone\", instance_type=~\"$instance_type\",  owner=~\"$owner\",  phase=~\"$phase\", arch=~\"$arch\", capacity_type=~\"$capacity_type\", provisioner=~\"$provisioner\"})",
          "interval": "",
          "legendFormat": "{{instance_type}}",
          "refId": "A"
        }
      ],
      "title": "Pod Distribution by Instance Type",
      "type": "timeseries"
    },
    {
      "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
      "description": "Pod Distribution by Phase",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 47,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 18
      },
      "id": 15,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "sum by (phase)(karpenter_pods_state{namespace=~\"$namespace\", node=~\"$node\", zone=~\"$zone\", instance_type=~\"$instance_type\",  owner=~\"$owner\",  phase=~\"$phase\", arch=~\"$arch\", capacity_type=~\"$capacity_type\", provisioner=~\"$provisioner\"})",
          "interval": "",
          "legendFormat": "{{phase}}",
          "refId": "A"
        }
      ],
      "title": "Pod Distribution by Phase",
      "type": "timeseries"
    },
    {
      "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
      "description": "Pod Distribution by Capacity Type",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 47,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 27
      },
      "id": 14,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "sum by (capacity_type)(karpenter_pods_state{namespace=~\"$namespace\", node=~\"$node\", zone=~\"$zone\", instance_type=~\"$instance_type\",  owner=~\"$owner\",  phase=~\"$phase\", arch=~\"$arch\", capacity_type=~\"$capacity_type\", provisioner=~\"$provisioner\"})",
          "interval": "",
          "legendFormat": "{{capacity_type}}",
          "refId": "A"
        }
      ],
      "title": "Pod Distribution by Capacity Type",
      "type": "timeseries"
    },
    {
      "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
      "description": "Pod Distribution by Owner",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 47,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 27
      },
      "id": 16,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "sum by (owner)(karpenter_pods_state{namespace=~\"$namespace\", node=~\"$node\", zone=~\"$zone\", instance_type=~\"$instance_type\",  owner=~\"$owner\",  phase=~\"$phase\", arch=~\"$arch\", capacity_type=~\"$capacity_type\", provisioner=~\"$provisioner\"})",
          "interval": "",
          "legendFormat": "{{owner}}",
          "refId": "A"
        }
      ],
      "title": "Pod Distribution by Owner",
      "type": "timeseries"
    }
  ],
  "refresh": "",
  "schemaVersion": 32,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
        "definition": "label_values(zone)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "zone",
        "options": [],
        "query": {
          "query": "label_values(zone)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
        "definition": "label_values(owner)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "owner",
        "options": [],
        "query": {
          "query": "label_values(owner)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
        "definition": "label_values(namespace)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "namespace",
        "options": [],
        "query": {
          "query": "label_values(namespace)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
        "definition": "label_values(node)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "node",
        "options": [],
        "query": {
          "query": "label_values(node)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
        "definition": "label_values(instance_type)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "instance_type",
        "options": [],
        "query": {
          "query": "label_values(instance_type)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
        "definition": "label_values(phase)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "phase",
        "options": [],
        "query": {
          "query": "label_values(phase)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "allValue": "",
        "current": {},
        "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
        "definition": "label_values(capacity_type)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "capacity_type",
        "options": [],
        "query": {
          "query": "label_values(capacity_type)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
        "definition": "label_values(arch)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "arch",
        "options": [],
        "query": {
          "query": "label_values(arch)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "allValue": "",
        "current": {},
        "datasource": "${DS_PROMETHEUS_WS-398BE464-890C-40B6-AD3C-B3E197597E91}",
        "definition": "label_values(provisioner)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "provisioner",
        "options": [],
        "query": {
          "query": "label_values(provisioner)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Pod Statistic (Karpenter)",
  "uid": "jizEPY2nk",
  "version": 1,
  "description": "Pods statistics for Karpenter"
}