Enabling features using feature gates
As an administrator, you can use feature gates to enable features that are not part of the default set of features so that you can use these non-default features in your cluster.
Understanding feature gates
You can use the FeatureGate custom resource (CR) to enable specific feature sets so that you can use specific non-default features in your cluster.
A feature set is a collection of OpenShift Container Platform features that are not enabled by default.
You can activate the following feature set by using the FeatureGate CR:
-
TechPreviewNoUpgrade. This feature set is a subset of the current Technology Preview features. This feature set allows you to enable these Technology Preview features on test clusters, where you can fully test them, while leaving the features disabled on production clusters.Warning
Enabling the
TechPreviewNoUpgradefeature set on your cluster cannot be undone and prevents minor version updates. You should not enable this feature set on production clusters.The following Technology Preview features are enabled by this feature set:
-
AdditionalRoutingCapabilities -
AdminNetworkPolicy -
AlibabaPlatform -
AutomatedEtcdBackup -
AWSClusterHostedDNS -
AWSClusterHostedDNSInstall -
AWSDedicatedHosts -
AWSDualStackInstall -
AWSServiceLBNetworkSecurityGroup -
AzureClusterHostedDNSInstall -
AzureDedicatedHosts -
AzureDualStackInstall -
AzureMultiDisk -
AzureWorkloadIdentity -
BootcNodeManagement -
BootImageSkewEnforcement -
BuildCSIVolumes -
CBORServingAndStorage -
ClientsPreferCBOR -
ClusterAPIInstallIBMCloud -
ClusterAPIMachineManagement -
ClusterMonitoringConfig -
ClusterVersionOperatorConfiguration -
ConsolePluginContentSecurityPolicy -
CPMSMachineNamePrefix -
CRDCompatibilityRequirementOperator -
DNSNameResolver -
DualReplica -
DyanmicServiceEndpointIBMCloud -
EtcdBackendQuota -
EventTTL -
Example -
ExternalOIDC -
ExternalOIDCWithUIDAndExtraClaimMappings -
GatewayAPI -
GatewayAPIController -
GCPClusterHostedDNS -
GCPClusterHostedDNSInstall -
GCPDualStackInstall -
GCPCustomAPIEndpoints -
GCPCustomAPIEndpointsInstall -
HighlyAvailableArbiter -
HyperShiftOnlyDynamicResourceAllocation -
ImageModeStatusReporting -
ImageStreamImportMode -
ImageVolume -
InsightsConfig -
InsightsOnDemandDataGather -
IrreconcilableMachineConfig -
KMSEncryptionProvider -
KMSv1 -
MachineAPIMigration -
MachineConfigNodes -
ManagedBootImages -
ManagedBootImagesAWS -
ManagedBootImagesAzure -
ManagedBootImagesCPMS -
ManagedBootImagesvSphere -
MaxUnavailableStatefulSet -
MetricsCollectionProfiles -
MinimumKubeletVersion -
MixedCPUsAllocation -
MultiDiskSetup -
MutableCSINodeAllocatableCount -
MutatingAdmissionPolicy -
NetworkDiagnosticsConfig -
NetworkLiveMigration -
NetworkSegmentation -
NewOLM -
NewOLMCatalogdAPIV1Metas -
NewOLMOwnSingleNamespace -
NewOLMPreflightPermissionChecks -
NewOLMWebhookProviderOpenshiftServiceCA -
NoRegistryClusterInstall -
NutanixMultiSubnets -
OnPremDNSRecords -
OpenShiftPodSecurityAdmission -
OSStreams -
OVNObservability -
PinnedImages -
PreconfiguredUDNAddresses -
ProcMountType -
RouteAdvertisements -
RouteExternalCertificate -
SELinuxMount -
ServiceAccountTokenNodeBinding -
SignatureStores -
SigstoreImageVerification -
SigstoreImageVerificationPKI -
StoragePerformantSecurityPolicy -
TranslateStreamCloseWebsocketRequests -
UpgradeStatus -
UserNamespacesPodSecurityStandards -
UserNamespacesSupport -
VolumeAttributesClass -
VolumeGroupSnapshot -
VSphereConfigurableMaxAllowedBlockVolumesPerNode -
VSphereHostVMGroupZonal -
VSphereMixedNodeEnv -
VSphereMultiDisk -
VSphereMultiNetworks
-
See the Additional resources sections for information on some of these features.
Enabling feature sets at installation
You can enable feature sets for all nodes in the cluster by editing the install-config.yaml file before you deploy the cluster. This allows you to use non-default features in your cluster.
-
You have an
install-config.yamlfile.
-
Use the
featureSetparameter to specify the name of the feature set you want to enable, such asTechPreviewNoUpgrade:Warning
Enabling the
TechPreviewNoUpgradefeature set on your cluster cannot be undone and prevents minor version updates. You should not enable this feature set on production clusters.Sampleinstall-config.yamlfile with an enabled feature setcompute: - hyperthreading: Enabled name: worker platform: aws: rootVolume: iops: 2000 size: 500 type: io1 metadataService: authentication: Optional type: c5.4xlarge zones: - us-west-2c replicas: 3 featureSet: TechPreviewNoUpgrade -
Save the file and reference it when using the installation program to deploy the cluster.
You can verify that the feature gates are enabled by looking at the kubelet.conf file on a node after the nodes return to the ready state.
-
From the Administrator perspective in the web console, navigate to Compute → Nodes.
-
Select a node.
-
In the Node details page, click Terminal.
-
In the terminal window, change your root directory to
/host:sh-4.2# chroot /host -
View the
kubelet.conffile:sh-4.2# cat /etc/kubernetes/kubelet.confSample output# ... featureGates: InsightsOperatorPullingSCA: true, LegacyNodeRoleBehavior: false # ...The features that are listed as
trueare enabled on your cluster.Note
The features listed vary depending upon the OpenShift Container Platform version.
Enabling feature sets using the web console
You can use the OpenShift Container Platform web console to enable feature sets for all of the nodes in a cluster by editing the FeatureGate custom resource (CR). Completing this task enables non-default features in your cluster.
-
In the OpenShift Container Platform web console, switch to the Administration → Custom Resource Definitions page.
-
On the Custom Resource Definitions page, click FeatureGate.
-
On the Custom Resource Definition Details page, click the Instances tab.
-
Click the cluster feature gate, then click the YAML tab.
-
Edit the cluster instance to add specific feature sets:
Warning
Enabling the
TechPreviewNoUpgradefeature set on your cluster cannot be undone and prevents minor version updates. You should not enable this feature set on production clusters.Sample Feature Gate custom resourceapiVersion: config.openshift.io/v1 kind: FeatureGate metadata: name: cluster # ... spec: featureSet: TechPreviewNoUpgradewhere:
metadata.name-
Specifies the name of the
FeatureGateCR. You must specifyclusterfor the name. spec.featureSet-
Specifies the feature set that you want to enable:
-
TechPreviewNoUpgradeenables specific Technology Preview features.
-
After you save the changes, new machine configs are created, the machine config pools are updated, and scheduling on each node is disabled while the change is being applied.
You can verify that the feature gates are enabled by looking at the kubelet.conf file on a node after the nodes return to the ready state.
-
From the Administrator perspective in the web console, navigate to Compute → Nodes.
-
Select a node.
-
In the Node details page, click Terminal.
-
In the terminal window, change your root directory to
/host:sh-4.2# chroot /host -
View the
kubelet.conffile:sh-4.2# cat /etc/kubernetes/kubelet.confSample output# ... featureGates: InsightsOperatorPullingSCA: true, LegacyNodeRoleBehavior: false # ...The features that are listed as
trueare enabled on your cluster.Note
The features listed vary depending upon the OpenShift Container Platform version.
Enabling feature sets using the CLI
You can use the OpenShift CLI (oc) to enable feature sets for all of the nodes in a cluster by editing the FeatureGate custom resource (CR). Completing this task enables non-default features in your cluster.
-
You have installed the OpenShift CLI (
oc).
-
Edit the
FeatureGateCR namedcluster:$ oc edit featuregate clusterWarning
Enabling the
TechPreviewNoUpgradefeature set on your cluster cannot be undone and prevents minor version updates. You should not enable this feature set on production clusters.Sample FeatureGate custom resourceapiVersion: config.openshift.io/v1 kind: FeatureGate metadata: name: cluster # ... spec: featureSet: TechPreviewNoUpgradewhere:
metadata.name-
Specifies the name of the
FeatureGateCR. This must becluster. spec.featureSet-
Specifies the feature set that you want to enable:
-
TechPreviewNoUpgradeenables specific Technology Preview features.
-
After you save the changes, new machine configs are created, the machine config pools are updated, and scheduling on each node is disabled while the change is being applied.
You can verify that the feature gates are enabled by looking at the kubelet.conf file on a node after the nodes return to the ready state.
-
From the Administrator perspective in the web console, navigate to Compute → Nodes.
-
Select a node.
-
In the Node details page, click Terminal.
-
In the terminal window, change your root directory to
/host:sh-4.2# chroot /host -
View the
kubelet.conffile:sh-4.2# cat /etc/kubernetes/kubelet.confSample output# ... featureGates: InsightsOperatorPullingSCA: true, LegacyNodeRoleBehavior: false # ...The features that are listed as
trueare enabled on your cluster.Note
The features listed vary depending upon the OpenShift Container Platform version.