File tree 1 file changed +16
-1
lines changed
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
250
250
251
251
For pod metrics, they can be sharded per node with the following flag:
252
252
253
- * ` --node `
253
+ * ` --node=$(NODE_NAME) `
254
254
255
255
Each kube-state-metrics pod uses FieldSelector (spec.nodeName) to watch/list pod metrics only on the same node.
256
256
@@ -276,6 +276,21 @@ spec:
276
276
fieldPath: spec.nodeName
277
277
```
278
278
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
+
279
294
Other metrics can be sharded via [ Horizontal sharding] ( #horizontal-sharding ) .
280
295
281
296
### Setup
You can’t perform that action at this time.
0 commit comments