Upgrade Management Environment on Kubernetes

This guide will walk you through upgrading your management environment, assuming it lives inside a Kubernetes cluster.

What You’ll Need

  • A configured management environment for Arrikto EKF 1.4.
  • An existing Kubernetes cluster.

Procedure

  1. Apply the latest rok-tools manifests. Choose one of the following options, based on your cloud provider:

    user@workstation:~$ kubectl apply -f <download_root>/rok-tools-eks.yaml

    Troubleshooting

    Forbidden

    In case you see the following error:

    The StatefulSet "rok-tools" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden
    1. Patch the gp2 StorageClass to allow volume expansion:

      root@rok-tools:/# kubectl patch sc gp2 \ > -p '{"allowVolumeExpansion":true}' storageclass.storage.k8s.io/gp2 patched
    2. Patch the data-rok-tools-0 PersistentVolumeClaim to expand the corresponding PersistentVolume:

      root@rok-tools:/# kubectl patch pvc data-rok-tools-0 \ > -p '{"spec":{"resources":{"requests":{"storage":"50Gi"}}}}' persistentvolumeclaim/data-rok-tools-0 patched
    3. Delete the existing rok-tools StatefulSet:

      root@rok-tools:/# kubectl delete sts rok-tools statefulset.apps "rok-tools" deleted
    4. Reapply the above manifest.

    user@workstation:~$ kubectl apply -f <download_root>/rok-tools-aks.yaml

    Troubleshooting

    Forbidden

    In case you see the following error:

    The StatefulSet "rok-tools" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden
    1. Patch the default StorageClass to allow volume expansion:

      root@rok-tools:/# kubectl patch sc default \ > -p '{"allowVolumeExpansion":true}' storageclass.storage.k8s.io/default patched
    2. Patch the data-rok-tools-0 PersistentVolumeClaim to expand the corresponding PersistentVolume:

      root@rok-tools:/# kubectl patch pvc data-rok-tools-0 \ > -p '{"spec":{"resources":{"requests":{"storage":"50Gi"}}}}' persistentvolumeclaim/data-rok-tools-0 patched
    3. Delete the existing rok-tools StatefulSet:

      root@rok-tools:/# kubectl delete sts rok-tools statefulset.apps "rok-tools" deleted
    4. Reapply the above manifest.

    user@workstation:~$ kubectl apply -f <download_root>/rok-tools-gke.yaml

    Troubleshooting

    Forbidden

    In case you see the following error:

    The StatefulSet "rok-tools" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden
    1. Patch the standard StorageClass to allow volume expansion:

      root@rok-tools:/# kubectl patch sc standard \ > -p '{"allowVolumeExpansion":true}' storageclass.storage.k8s.io/standard patched
    2. Patch the data-rok-tools-0 PersistentVolumeClaim to expand the corresponding PersistentVolume:

      root@rok-tools:/# kubectl patch pvc data-rok-tools-0 \ > -p '{"spec":{"resources":{"requests":{"storage":"50Gi"}}}}' persistentvolumeclaim/data-rok-tools-0 patched
    3. Delete the existing rok-tools StatefulSet:

      root@rok-tools:/# kubectl delete sts rok-tools statefulset.apps "rok-tools" deleted
    4. Reapply the above manifest.

  2. Verify that the rok-tools Pod is ready. Check Pod status and verify that field STATUS is Running and field READY is 1/1:

    user@workstation:~$ kubectl get pods rok-tools-0 NAME READY STATUS RESTARTS AGE rok-tools-0 1/1 Running 0 20s
  3. Enter the container:

    user@workstation:~$ kubectl exec -ti statefulset/rok-tools -- /bin/bash

Verify

  1. Ensure that your management environment has the latest version of rok-deploy:

    root@rok-tools:~# rok-deploy --version Rok rok-deploy Build ID Rok 1.5.3 "Ultramarine" (release - release-1.5) (iliastsi@rok-dev) (GCC 6.3.0) 2022-08-03T10:56:14Z

Summary

You have successfully upgraded your management environment.

What’s Next

The next step is to switch your release channel to the release-1.5 release channel for EKF.