Enabling Alpha Feature Gate

This section discusses the steps required to enable VolumeSnapshotDataSource feature gate in OpenShift and Upstream Kubernetes environments

Enable FeatureGate via OpenShift

Turning on Technology Preview features using the feature gate custom resource cannot be undone and prevents cluster upgrades. Please ensure that a non-production test and development environment is used.

  • Login to UI using the admin credentials. Navigate to the Administration section and click on "Cluster Settings"

Cluster Setting Screen
  • Click on the FeatureGate to edit the Resource.

Edit FeatureGate Resource
  • Click on YAML tab:

YAML Tab of FeatureGate Resource
  • Replace the YAML with the following definition

apiVersion: config.openshift.io/v1
kind: FeatureGate
metadata:
annotations:
release.openshift.io/create-only: 'true'
creationTimestamp: '2020-03-12T12:42:03Z'
generation: 2
name: cluster
resourceVersion: '2976807'
selfLink: /apis/config.openshift.io/v1/featuregates/cluster
uid: 73d6307b-9dbf-4408-80d8-eaa4dd34d29c
spec:
customNoUpgrade:
enabled:
- VolumeSnapshotDataSource
featureSet: CustomNoUpgrade

Make sure the yaml file is properly formed. Validate with YAML validation tools before entering the text here. Enabling a featuregate which doesn’t exist in Kubernetes might make apiserver fail and make cluster non recoverable.

  • Click Save and wait for minimum 15 mins for the Cluster to stabilise and implement the FeatureGate. You can check the kube-apiserver pod should be restarted and come in running state. 1 kubectl get pods -n openshift-kube-apiserver

Enable FeatureGate via CLI (OpenShift)

  • Run the following command to get the FeatureGate resource.

kubectl get featuregate
  • Run the following command to edit the FeatureGate resource

cat <<EOF | kubectl apply -f -
apiVersion: config.openshift.io/v1
kind: FeatureGate
metadata:
name: cluster
spec:
customNoUpgrade:
enabled:
- VolumeSnapshotDataSource
featureSet: CustomNoUpgrade
EOF

This will enable the VolumeSnapshotDataSource FeatureGate. You should wait for 15 mins for the cluster to stabilize before proceeding.

Enable FeatureGate (Upstream)

For Upstream Kubernetes environments, please edit the kube-apiserver manifest file and add the following line

--feature-gates=VolumeSnapshotDataSource=true

For clusters deployed with kubeadm, the manifest file is located under /etc/kubernetes/manifests on the master node