Installing Config Connector v1alpha1 CRDs
This topic explains how to install v1alpha1 Google Cloud resource Custom Resource Definitions (CRDs) in Config Connector.
Before you begin
Ensure Config Connector is installed manually or through the GKE add-on.
Check your Config Connector version and ensure it is 1.103.0 and above. You can check the Config Connector version by connecting to the cluster where Config Connector is installed and running the following command:
kubectl get ns cnrm-system -o jsonpath='{.metadata.annotations.cnrm\.cloud\.google\.com/version}'
Installing the v1alpha1 CRDs
Clone the GitHub repository:
git clone https://github.com/GoogleCloudPlatform/k8s-config-connectorgit checkoutto your Config Connector version:cd k8s-config-connector echo 'v'$(kubectl get ns cnrm-system -o jsonpath='{.metadata.annotations.cnrm\.cloud\.google\.com/version}') | xargs git checkoutInstall the v1alpha1 CRDs:
cd crdsIf you want to install a specific v1alpha1 CRD, run the following command:
kubectl apply -f CRD_FILENAMEReplace
CRD_FILENAMEwith the filename of the v1alpha1 CRD you want to install.If you want to install all the v1alpha1 CRDs, run the following command:
kubectl apply $(ls *v1alpha1*.yaml | awk ' { print " -f " $1 } ')
The v1alpha1 CRDs are successfully installed when the kubectl apply command
successfully completes.
Upgrading the v1alpha1 CRDs
Ensure Config Connector version is upgraded before you upgrade the v1alpha1 CRDs.
git checkoutto your Config Connector version at your local Config Connector repository:echo 'v'$(kubectl get ns cnrm-system -o jsonpath='{.metadata.annotations.cnrm\.cloud\.google\.com/version}') | xargs git checkoutUpgrade the v1alpha1 CRDs:
cd crdsIf you want to upgrade a specific v1alpha1 CRD, run the following command:
kubectl apply -f CRD_FILENAMEReplace
CRD_FILENAMEwith the filename of the v1alpha1 CRD you want to install.If you want to upgrade all the v1alpha1 CRDs, run the following command:
kubectl apply $(ls *v1alpha1*.yaml | awk ' { print " -f " $1 } ')
The v1alpha1 CRDs are successfully upgraded when the kubectl apply command
successfully completes.
Uninstalling the v1alpha1 CRDs
Delete the CRs for v1alpha1 CRDs if you no longer need the underlying Google Cloud resources. Otherwise, skip this step.
Check out to your Config Connector version at your local Config Connector repository:
echo 'v'$(kubectl get ns cnrm-system -o jsonpath='{.metadata.annotations.cnrm\.cloud\.google\.com/version}') | xargs git checkoutUninstall the v1alpha1 CRDs:
cd crds kubectl delete $(ls *v1alpha1*.yaml | awk ' { print " -f " $1 } ')
The v1alpha1 CRDs are successfully uninstalled if the kubectl delete command
successfully completes.