vertical-pod-autoscaler
by [riftbit]
Set of components that automatically adjust the amount of CPU and memory requested by pods running in the Kubernetes Cluster
About this chart
Vertical Pod Autoscaler
Vertical Pod Autoscaler is a set of components that automatically adjust the amount of CPU and memory requested by pods running in the Kubernetes Cluster.
TL;DR;
$ helm repo add riftbit https://charts.riftbit.com/charts/
$ helm install my-release riftbit/vertical-pod-autoscaler
Introduction
This chart bootstraps a Vertical Pod Autoscaler deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.16+
- Metrics Server 0.2+ (you can use the stable/metrics-server chart)
- Helm 3.0+
Installing
Install the chart using:
$ helm repo add riftbit https://charts.riftbit.com/charts/
$ helm install my-release riftbit/vertical-pod-autoscaler
These commands deploy Vertical Pod Autoscaler on the Kubernetes cluster in the default configuration and with the release name my-release. The deployment configuration can be customized by specifying the customization parameters with the helm install command using the --values or --set arguments. Find more information in the configuration section of this document.
Upgrading
Replace the custom resource definitions created by the chart using:
kubectl replace -f crds/verticalpodautoscaler.yaml
kubectl replace -f crds/verticalpodautoscalercheckpoint.yaml
Upgrade the chart deployment using:
$ helm upgrade my-release riftbit/vertical-pod-autoscaler
The command upgrades the existing my-release deployment with the most latest release of the chart.
TIP: Use helm repo update to update information on available charts in the chart repositories.
Upgrading to version 3.0.0
The chart is no more compatible with Helm 2.
Refer to the Helm documentation for more information.
Upgrading to version 2.0.0
The port names have been changed to be compatible with Istio service mesh.
Uninstalling
Delete the vpa-webhook-config mutating webhook configuration automatically created by Vertical Pod Autoscaler admission controller component using:
$ kubectl delete mutatingwebhookconfiguration vpa-webhook-config
Uninstall the my-release deployment using:
$ helm uninstall my-release
The command deletes the release named my-release and frees all the kubernetes resources associated with the release.
TIP: Specify the --purge argument to the above command to remove the release from the store and make its name free for later use.
Optionally, delete the custom resource definitions created by the chart using:
$ kubectl delete crd verticalpodautoscalers.autoscaling.k8s.io
$ kubectl delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io
Configuration
The following tables lists all the configurable parameters expose by the chart and their default values.
Common parameters
| Name | Description | Default |
|---|---|---|
kubeVersion | Override Kubernetes version | "" |
imagePullSecrets | Docker registry secret names as an array | [] |
nameOverride | Partially override vertical-pod-autoscaler.fullname template with a string (will prepend the release name) | nil |
fullnameOverride | Fully override vertical-pod-autoscaler.fullname template with a string | nil |
commonAnnotations | Annotations to add to all deployed objects | {} |
commonLabels | Labels to add to all deployed objects | {} |
Admission controller parameters
| Name | Description | Default |
|---|---|---|
admissionController.replicaCount | Number of replicas | 1 |
admissionController.image.repository | Image name | k8s.gcr.io/autoscaling/vpa-admission-controller |
admissionController.image.tag | Image tag | 0.9.2 |
admissionController.image.pullPolicy | Image pull policy | IfNotPresent |
admissionController.pdb.create | Specifies whether a pod disruption budget should be created | false |
admissionController.pdb.minAvailable | Minimum number/percentage of pods that should remain scheduled | 1 |
admissionController.pdb.maxUnavailable | Maximum number/percentage of pods that may be made unavailable | nil |
admissionController.serviceAccount.create | Specify whether to create a ServiceAccount | true |
admissionController.serviceAccount.annotations | ServiceAccount annotations | {} |
admissionController.serviceAccount.name | The name of the ServiceAccount to create | Generated using the vertical-pod-autoscaler.admissionController.fullname template |
admissionController.podAnnotations | Additional pod annotations | {} |
admissionController.podLabels | Additional pod labels | {} |
admissionController.podSecurityContext | Pod security context | { runAsNonRoot: true, runAsUser: 65534 } |
admissionController.priorityClassName | Priority class name | nil |
admissionController.securityContext | Container security context | {} |
admissionController.livenessProbe.enabled | Enable liveness probe | true |
admissionController.livenessProbe.initialDelaySeconds | Delay before the liveness probe is initiated | 0 |
admissionController.livenessProbe.periodSeconds | How often to perform the liveness probe | 10 |
admissionController.livenessProbe.timeoutSeconds | When the liveness probe times out | 1 |
admissionController.livenessProbe.failureThreshold | Minimum consecutive failures for the liveness probe to be considered failed after having succeeded | 3 |
admissionController.livenessProbe.successThreshold | Minimum consecutive successes for the liveness probe to be considered successful after having failed | 1 |
admissionController.readinessProbe.enabled | Enable readiness probe | true |
admissionController.readinessProbe.initialDelaySeconds | Delay before the readiness probe is initiated | 0 |
admissionController.readinessProbe.periodSeconds | How often to perform the readiness probe | 10 |
admissionController.readinessProbe.timeoutSeconds | When the readiness probe times out | 1 |
admissionController.readinessProbe.failureThreshold | Minimum consecutive failures for the readiness probe to be considered failed after having succeeded | 3 |
admissionController.readinessProbe.successThreshold | Minimum consecutive successes for the readiness probe to be considered successful after having failed | 1 |
admissionController.service.annotations | Service annotations | {} |
admissionController.service.type | Service type | ClusterIP |
admissionController.service.clusterIP | Static cluster IP address or None for headless service when service type is ClusterIP | nil |
admissionController.resources | CPU/Memory resource requests/limits | {} |
admissionController.nodeSelector | Node labels for pod assignment | {} |
admissionController.tolerations | Tolerations for pod assignment | [] |
admissionController.affinity | Map of node/pod affinities | {} |
admissionController.extraArgs | Additional container arguments | { v: 2 } |
admissionController.extraEnvVars | Additional container environment variables | [] |
admissionController.extraEnvVarsCM | Name of existing ConfigMap containing additional container environment variables | nil |
Deploy vertical-pod-autoscaler with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has vertical-pod-autoscaler on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartvertical-pod-autoscaler is pinned at v3.6.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply