File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ The downside of using an auto-sharded setup comes from the rollout strategy supp
250250
251251For pod metrics, they can be sharded per node with the following flag:
252252
253- * ` --node `
253+ * ` --node=$(NODE_NAME) `
254254
255255Each kube-state-metrics pod uses FieldSelector (spec.nodeName) to watch/list pod metrics only on the same node.
256256
@@ -276,6 +276,21 @@ spec:
276276 fieldPath: spec.nodeName
277277```
278278
279+ To track metrics for unassigned pods, you need to add an additional deployment and set ` --node="" ` , as shown in the following example:
280+ ```
281+ apiVersion: apps/v1
282+ kind: Deployment
283+ spec:
284+ template:
285+ spec:
286+ containers:
287+ - image: registry.k8s.io/kube-state-metrics/kube-state-metrics:IMAGE_TAG
288+ name: kube-state-metrics
289+ args:
290+ - --resources=pods
291+ - --node=""
292+ ```
293+
279294Other metrics can be sharded via [ Horizontal sharding] ( #horizontal-sharding ) .
280295
281296### Setup
You can’t perform that action at this time.
0 commit comments