From 14e9c7b6c87dcd9a6caf68c6aad06d0723e4dc54 Mon Sep 17 00:00:00 2001 From: Adrian Moisey Date: Tue, 5 Nov 2024 08:44:50 +0200 Subject: [PATCH] Clarify how to run VPA with multiple Pods --- vertical-pod-autoscaler/FAQ.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vertical-pod-autoscaler/FAQ.md b/vertical-pod-autoscaler/FAQ.md index 9e0f5634009c..248faa8c8d3c 100644 --- a/vertical-pod-autoscaler/FAQ.md +++ b/vertical-pod-autoscaler/FAQ.md @@ -6,6 +6,7 @@ - [How can I apply VPA to my Custom Resource?](#how-can-i-apply-vpa-to-my-custom-resource) - [How can I use Prometheus as a history provider for the VPA recommender?](#how-can-i-use-prometheus-as-a-history-provider-for-the-vpa-recommender) - [I get recommendations for my single pod replicaSet, but they are not applied. Why?](#i-get-recommendations-for-my-single-pod-replicaset-but-they-are-not-applied) +- [Can I run the VPA in an HA configuration?](#can-i-run-the-vpa-in-an-ha-configuration) - [What are the parameters to VPA recommender?](#what-are-the-parameters-to-vpa-recommender) - [What are the parameters to VPA updater?](#what-are-the-parameters-to-vpa-updater) @@ -162,6 +163,16 @@ spec: and then deploy it manually if your vpa is already configured. +### Can I run the VPA in an HA configuration? + +The VPA admission-controller can be run with multiple active Pods at any given time. + +Both the updater and recommender can only run a single active Pod at a time. Should you +want to run a Deployment with more than one pod, it's recommended to enable a lease +election with the `--leader-elect=true` parameter. + +**NOTE**: If using GKE, you must set `--leader-elect-resource-name` to something OTHER than "vpa-recommender", for example "vpa-recommender-lease". + ### What are the parameters to VPA recommender? The following startup parameters are supported for VPA recommender: