cluster-overprovisioner

by joaquinito2051

Helm chartv0.2.0App 1.0

Installs the a deployment that overprovisions the cluster

About this chart

Cluster overprovisioner

This chart provide a buffer for cluster autoscaling to allow overprovisioning of cluster nodes. This is desired when you have work loads that need to scale up quickly without waiting for the new cluster nodes to be created and join the cluster.

It works but creating a deployment that creates pods of a lower than default PriorityClass. These pods request resources from the cluster but don't actually consume any resources. These pods are then evicted allowing other normal pods are created while also triggering a scale-up by the cluster-autoscaler.

This approach is the current recommended method to achieve overprovisioning.

Prerequisites

  • Kubernetes 1.11+ with Beta APIs enabled or 1.8-1.10 with alpha APIs enabled
  • Configure the cluster-autoscaler for your k8s version. Usually just add extraArgs.expendable-pods-priority-cutoff=-10 setting.

Installing the Chart

To install the chart with the release name my-release and default configuration:

$ helm install --name my-release <helm-repo>/cluster-overprovisioner

$ helm install --name my-release stable/cluster-overprovisioner

Uninstalling the Chart

To delete the chart:

$ helm delete my-release

Configuration

Some thought or experimentation is required to set deployment.resources and deployment.replicaCount correctly. Aspects such as cluster size, costs and size of buffer required should be considered.

The following table lists the configurable parameters for this chart and their default values.

ParameterDescriptionDefault
priorityClassOverprovision.nameName of the overprovision priorityClassoverprovision
priorityClassOverprovision.valuePriority value of the overprovision priorityClass-1
priorityClassDefault.enabledIf true, enable default priorityClasstrue
priorityClassDefault.nameName of the default priorityClassdefault
priorityClassDefault.valuePriority value of the default priorityClass0
replicaCountNumber of replicas1
resourcesResources for the overprovision pods{}
image.repositoryImage repositoryk8s.gcr.io/pause
image.tagImage tag3.1
image.pullPolicyContainer pull policyIfNotPresent
affinityMap of node/pod affinities{}
nodeSelectorNode labels for pod assignment{}
annotationsOptional deployment annotations{}
fullnameOverrideOverride the fullname of the chartnil
nameOverrideOverride the name of the chartnil
tolerationsOptional deployment tolerations[]

Specify each parameter using the --set key=value[,key=value] argument to helm install or provide a YAML file containing the values for the above parameters:

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install` or provide a YAML file containing the values for the above parameters:
$ helm install --name my-release <helm-repo>/cluster-overprovisioner --values values.yaml

Deploy cluster-overprovisioner with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cluster-overprovisioner 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcluster-overprovisioner is pinned at v0.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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