Back to Charts

⚠️ Repo Archive Notice

stable/k8s-spot-termination-handler/README.md

latest3.6 KB
Original Source

⚠️ Repo Archive Notice

As of Nov 13, 2020, charts in this repo will no longer be updated. For more information, see the Helm Charts Deprecation and Archive Notice, and Update.

Kubernetes AWS EC2 Spot Termination Notice Handler

This chart installs the k8s-spot-termination-handler as a daemonset across the cluster nodes.

DEPRECATION NOTICE

This chart is deprecated and no longer supported.

Purpose

Spot instances on EC2 come with significant cost savings, but with the burden of instance being terminated if the market price goes higher than the maximum price you have configured.

The termination handler watches the AWS Metadata API for termination requests and starts draining the node so that it can be terminated safely. Optionally it can also send a message to a Slack channel informing that a termination notice has been received.

Installation

You should install into the kube-system namespace, but this is not a requirement. The following example assumes this has been chosen.

helm install stable/k8s-spot-termination-handler --namespace kube-system

Configuration

The following table lists the configurable parameters of the k8s-spot-termination-handler chart and their default values.

ParameterDescriptionDefault
image.repositorycontainer image repositorykubeaws/kube-spot-termination-notice-handler
image.tagcontainer image tag1.13.7-1
image.pullPolicycontainer image pull policyIfNotPresent
imagePullSecretsarray of imagePullSecrets containing private registry credentials[]
noticeUrlthe URL of EC2 spot instance termination notice endpointhttp://169.254.169.254/latest/meta-data/spot/termination-time
pollIntervalthe interval in seconds between attempts to poll EC2 metadata API for termination events"5"
verboseEnable verbosenot defined
slackUrlSlack webhook URL to send messages when a termination notice is receivednot defined
clusterNameif slackUrl is set - use this cluster name in Slack messagesnot defined
enableLogspoutif true, enable the Logspout log capturing. Logspout should be deployed separatelyfalse
rbac.createif true, create & use RBAC resourcestrue
serviceAccount.createif true, create a service accounttrue
serviceAccount.namethe name of the service account to use. If not set and create is true, a name is generated using the fullname template.``
detachAsgif true, the spot termination handler will detect (standard) AutoScaling Group, and initiate detach when termination notice is detected.false
gracePeriodGrace period for node draining120
envFromSecretName of a Kubernetes secret (must be manually created in the same namespace) containing values to be added to the environment""
resourcespod resource requests & limits{}
nodeSelectornode labels for pod assignment{}
tolerationsnode taints to tolerate (requires Kubernetes >=1.6)[]
affinitynode/pod affinities (requires Kubernetes >=1.6){}
priorityClassNamepod priorityClassName for pod.``
hostNetworkcontrols whether the pod may use the node network namespacetrue
podAnnotationsannotations to be added to pods{}
updateStrategycan be either RollingUpdate or OnDeleteRollingUpdate
podSecurityContextsecurity context applied to the pod{}