Elastigroup will work with a designated pod inside your Kubernetes cluster that will report constant updates about the clusters’ condition via a one-way link.

Using that information, the Elastigroup will scale the cluster up or down according to the overall nodes utilization and your pods’ needs.

In order to create this connection between your k8s cluster and Elastigroup, you will need to implement a small configuration change on both the k8s cluster side and the Elastigroup side as instructed below;


In order to run the Spotinst in-cluster autoscaler, you’ll need to run the following controller application in your k8s cluster spotinst-kubernetes-cluster-controller
This controller needs parameters

  1. spotinst.token – The Spotinst access token (can be generated from the Spotinst console / API)
  2. spotinst.account – The spotinst account Id (Learn more about Accounts and Organizations)
  3. spotinst.cluster-identifier – This identifier should be identical to the clusterIdentifier that was configured on the Elastigroup.


Installing The Controller

1. Create a yaml file configMap.yaml with the following parameters;

  • kind: ConfigMap
  • apiVersion: v1
  • metadata:
  • name: spotinst-kubernetes-cluster-controller-config
  • namespace: kube-system
  • data:
  • spotinst.token: <TOKEN>
  • spotinst.account: <ACCOUNT_ID>
  • spotinst.cluster-identifier: <IDENTIFIER>

(please replace <TOKEN> <ACCOUNT_ID> and <IDENTIFIER> )


2. Load the parameters into the cluster config

  • kubectl apply -f configMap.yaml


3. Install the controller and its dependencies

  • kubectl apply -f http://spotinst-public.s3.amazonaws.com/integrations/kubernetes/cluster-controller/spotinst-kubernetes-cluster-controller.yaml


Now the spotinst-kubernetes-cluster-controller is installed and should be reporting its heartbeat to the relevant Spotinst Elastigroup.