Configure Rok Scheduler for your Kubernetes Version

This guide will walk you through configuring the Rok Scheduler after you have upgraded your control plane from Kubernetes 1.19 to 1.20 or from 1.20 to 1.21.

Note

This guide assumes that you have already deployed the Rok Scheduler on your cluster. If this does not hold, please proceed to the corresponding guide for deploying the Rok Scheduler on your cluster.

What You’ll Need

Check Your Environment

  1. Get the version of the Kubernetes control plane. Choose one of the following options, based on the upgrade you’ve made:

    root@rok-tools:~# kubectl version -ojson | jq -r '.serverVersion.gitVersion' v1.21.5-eks-bc4871b

    This guide presumes that you have upgraded your control plane to Kubernetes 1.21. The output of the above command must start with v1.21. If it does not, your control plane does not have the expected Kubernetes version. Please upgrade your control plane before proceeding.

    root@rok-tools:~# kubectl version -ojson | jq -r '.serverVersion.gitVersion' v1.20.11-eks-f17b81

    This guide presumes that you have upgraded your control plane to Kubernetes 1.20. The output of the above command must start with v1.20. If it does not, your control plane does not have the expected Kubernetes version. Please upgrade your control plane before proceeding.

Procedure

  1. Go to your GitOps repository, inside your rok-tools management environment:

    root@rok-tools:~# cd ~/ops/deployments
  2. Edit the Rok Scheduler overlay that corresponds to your Kubernetes version. Choose one of the following options, based on the upgrade you’ve made:

    Edit rok/rok-scheduler/overlays/deploy/kustomization.yaml and use k8s-1.21 instead of k8s-1.20 as the base overlay:

    resources: #- ../../base #- ../k8s-1.19 #- ../k8s-1.20 - ../k8s-1.21

    Edit rok/rok-scheduler/overlays/deploy/kustomization.yaml and use k8s-1.20 instead of k8s-1.19 as the base overlay:

    resources: #- ../../base #- ../k8s-1.19 - ../k8s-1.20 #- ../k8s-1.21
  3. Commit your changes. Choose one of the following options, based on the upgrade you’ve made:

    root@rok-tools:~/ops/deployments# git commit -am "Configure Rok Scheduler for Kubernetes 1.21"
    root@rok-tools:~/ops/deployments# git commit -am "Configure Rok Scheduler for Kubernetes 1.20"
  4. Mark your progress:

    root@rok-tools:~/ops/deployments# export DATE=$(date -u "+%Y-%m-%dT%H.%M.%SZ")
    root@rok-tools:~/ops/deployments# git tag \ > -a deploy/${DATE?}/release-1.5/ops-eks-upgrade-scheduler \ > -m "Configure Rok Scheduler for your Kubernetes Version"
  5. Apply the kustomization:

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-scheduler/overlays/deploy

Verify

  1. Verify that the Rok Scheduler is up and running. Verify that field READY is 1/1:

    root@rok-tools:~# kubectl get deploy -n rok-system rok-scheduler NAME READY AGE rok-scheduler 1/1 1m
  2. Get the image of the Rok Scheduler and ensure that the image tag matches the Kubernetes version 1.20, that is, it starts with 1.20:

    root@rok-tools:~# kubectl -n rok-system get deploy rok-scheduler \ > -o jsonpath='{.spec.template.spec.containers[].image}{"\n"}' gcr.io/arrikto/kube-scheduler-amd64:v1.20.16-rc.0-2-gd1308200f

Summary

You have successfully configured Rok Scheduler for your updated Kubernetes version.

What’s Next

The next step is to configure the Cluster Autoscaler for the Kubernetes version of your EKS cluster.