fbpx

In case an update is required for the Kubernetes Controller, run the following command:

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

If the controller is already installed, this will start a roll in the cluster that will launch a new pod and will terminate the old one.
When the controller starts it prints the version in the log.

The controller supports auto update. Meaning, when a new version of the controller is available, it will automatically be updated. By default, the auto update is enabled. In case you want to disable the auto update, follow these instructions:

  1. Download the Spotinstcontroller YAML file using this link: https://s3.amazonaws.com/spotinst-public/integrations/kubernetes/cluster-controller/spotinst-kubernetes-cluster-controller.yaml
  2. Edit the file and add the DISABLE_AUTO_UPDATE variable as true under the Deployment resource as follows:
kind: Deployment
apiVersion: apps/v1beta1
metadata:
  labels:
    k8s-app: spotinst-kubernetes-cluster-controller
  name: spotinst-kubernetes-cluster-controller
  namespace: kube-system
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      k8s-app: spotinst-kubernetes-cluster-controller
  template:
    metadata:
      labels:
        k8s-app: spotinst-kubernetes-cluster-controller
    spec:
      containers:
      - name: spotinst-kubernetes-cluster-controller
        imagePullPolicy: Always
        image: spotinst/kubernetes-cluster-controller:1.0.11
        volumeMounts:
        - name: spotinst-kubernetes-cluster-controller-certs
          mountPath: /certs
        - name: tmp-volume
          mountPath: /tmp
        env:
           - name: SPOTINST_TOKEN
             valueFrom:
               configMapKeyRef:
                 name: spotinst-kubernetes-cluster-controller-config
                 key: spotinst.token
           - name: SPOTINST_ACCOUNT
             valueFrom:
               configMapKeyRef:
                 name: spotinst-kubernetes-cluster-controller-config
                 key: spotinst.account
           - name: CLUSTER_IDENTIFIER
             valueFrom:
               configMapKeyRef:
                 name: spotinst-kubernetes-cluster-controller-config
                 key: spotinst.cluster-identifier
           - name: DISABLE_AUTO_UPDATE
             value: "true"
      volumes:
      - name: spotinst-kubernetes-cluster-controller-certs
        secret:
          secretName: spotinst-kubernetes-cluster-controller-certs
      - name: tmp-volume
        emptyDir: {}
      serviceAccountName: spotinst-kubernetes-cluster-controller
      tolerations:
      - key: node-role.kubernetes.io/master
        effect: NoSchedule