Enabling In-Place Updates of Pod Resources ​
This is a short guide covering the adoption mechanism of in-place Pod resource updates in Gardener Vertical Pod Autoscaler deployments.
Compatibility ​
Refer to the in-place resource updates guide for details on Kubernetes clusters compatibility, Vertical Pod Autoscaler feature gate definition and availability.
Configuration ​
Gardener provides a dedicated resource manager webhook capable of mutating VerticalPodAutoscaler resources, configured with update mode Auto or Recreate, with the in-place updates enabling InPlaceOrRecreate. Available for deployment with both gardenlet and gardener operator, the mutating webhook can be activated with the following feature gate, listed within the respective component manifest. Refer to the Gardener feature gates page for additional details:
VPAInPlaceUpdatesTo keep a VerticalPodAutoscaler resource out of the mutating webhook scope, add the following skip label, indicating that the resource should preserve its current configuration and not get updated:
vpa-in-place-updates.resources.gardener.cloud/skipgardenlet ​
With Gardener v1.138, the
VPAInPlaceUpdatesfeature gate got promoted toBetaand is now enabled by default.
To enable the mutating resource manager webhook, the VPAInPlaceUpdates feature gate must be set to true:
featureGates:
VPAInPlaceUpdates: trueRefer to the gardenlet component configuration manifest for an overview.
Shoot ​
When deployed in a
Shootcluster, the mutating webhook targetsvertical pod autoscalerresources inside thekube-systemandkubernetes-dashboardnamespaces.
With the adoption of Vertical Pod Autoscaler 1.6.0, the InPlaceOrRecreate feature gate got promoted to GA and cannot be disabled. Follow the in-place resource updates guide for more details about the Vertical Pod Autoscaler components setup.
Seed ​
When deployed in a
Seedcluster, the mutating webhook targetsvertical pod autoscalerresources outside thekube-systemandkubernetes-dashboardnamespaces.
With the adoption of Vertical Pod Autoscaler 1.6.0, the InPlaceOrRecreate feature gate got promoted to GA and cannot be disabled. Follow the in-place resource updates guide for more details about the Vertical Pod Autoscaler components setup.
NOTE
If you are using a VPA not managed by gardenlet (i.e., Seeds's .spec.settings.verticalPodAutoscaler.enabled is set to false), ensure that your VPA installation supports in-place resource updates.
Gardener Operator ​
With Gardener v1.138, the
VPAInPlaceUpdatesfeature gate got promoted toBetaand is now enabled by default.
To enable the mutating resource manager webhook, the VPAInPlaceUpdates feature gate must be set to true:
featureGates:
VPAInPlaceUpdates: trueRefer to the operator component configuration manifest for an overview.
NOTE
If you are using a VPA not managed by gardener-operator (i.e., Garden's .spec.runtimeCluster.settings.verticalPodAutoscaler.enabled is set to false), ensure that your VPA installation supports in-place resource updates.