Skip to content

Commit 1d01892

Browse files
committed
fixing CI error
1 parent 9f6b208 commit 1d01892

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ are deleted they are no longer visible on the `/metrics` endpoint.
5353
* [Horizontal sharding](#horizontal-sharding)
5454
* [Automated sharding](#automated-sharding)
5555
* [Daemonset sharding for pod metrics](#daemonset-sharding-for-pod-metrics)
56+
* [High Availability](#high-availability)
5657
* [Setup](#setup)
5758
* [Building the Docker container](#building-the-docker-container)
5859
* [Usage](#usage)
@@ -305,6 +306,12 @@ spec:
305306

306307
Other metrics can be sharded via [Horizontal sharding](#horizontal-sharding).
307308

309+
### High Availability
310+
311+
For high availability, run multiple kube-state-metrics replicas with anti-affinity rules to prevent single points of failure. Configure 2 replicas, anti-affinity rules on hostname, rolling update strategy with `maxUnavailable: 1`, and a PodDisruptionBudget with `minAvailable: 1`.
312+
313+
When using multiple replicas, Prometheus will scrape all instances resulting in duplicate metrics with different instance labels. Handle deduplication in queries using `avg without(instance) (metric_name)`. Brief inconsistencies may occur during state transitions but resolve quickly as replicas sync with the API server.
314+
308315
### Setup
309316

310317
Install this project to your `$GOPATH` using `go get`:

0 commit comments

Comments
 (0)