Prepare Cluster for Rok CSI¶
Rok uses the Container Storage Interface (CSI) v1alpha1. However, GKE forces a different, incompatible version by default. In this guide you will prepare your cluster to install the CSI version that Rok needs.
See also
- Official documentation on Kubernetes Custom Resources.
Overview
What You'll Need¶
- A configured management environment.
- Your clone of the Arrikto GitOps repository.
- An existing GKE cluster.
- Access to the GKE cluster.
Procedure¶
Prepare your cluster to install the CSI version that Rok needs with the following commands:
Go to your GitOps repository, inside your
rok-tools
management environment:root@rok-tools:~# cd ~/ops/deployments
Install Kyverno:
root@rok-tools:~/ops/deployments# rok-deploy --apply rok/kyverno/overlays/deploy
Apply a Kyverno policy to disable the original GKE-provided CSI version:
root@rok-tools:~/ops/deployments# rok-deploy --apply rok/csi-disable-v1beta1/overlays/deploy
Verify that Kyverno is up-and-running:
root@rok-tools:~/ops/deployments# kubectl get deploy -n kyverno
Delete the original GKE-provided VolumeSnapshot Custom Resource Definition (CRD):
root@rok-tools:~/ops/deployments# kubectl delete customresourcedefinitions.apiextensions.k8s.io volumesnapshots.snapshot.storage.k8s.io
Delete the original GKE-provided VolumeSnapshotClass CRD:
root@rok-tools:~/ops/deployments# kubectl delete customresourcedefinitions.apiextensions.k8s.io volumesnapshotclasses.snapshot.storage.k8s.io
Delete the original GKE-provided VolumeSnapshotContents CRD:
root@rok-tools:~/ops/deployments# kubectl delete customresourcedefinitions.apiextensions.k8s.io volumesnapshotcontents.snapshot.storage.k8s.io