Enabling OKD features using FeatureGates

As an administrator, you can use feature gates to enable features that are not part of the default set of features.

Understanding feature gates

You can use the FeatureGate custom resource (CR) to enable specific feature sets in your cluster. A feature set is a collection of OKD features that are not enabled by default.

For example, the TechPreviewNoUpgrade feature set allows you to enable a subset of the current Technology Preview features on test clusters, where you can fully test them, while leaving the features disabled on production clusters.

You can activate any of the following feature sets by using the FeatureGate CR:

Feature SetDescription

IPv6DualStackNoUpgrade

Enables the dual-stack networking mode in your cluster. Dual-stack networking supports the use of IPv4 and IPv6 simultaneously. Enabling this feature set is not supported, cannot be undone, and prevents upgrades. This feature set is not recommended on production clusters.

TechPreviewNoUpgrade

Enables Technology Preview features that are not part of the default features. Enabling this feature set cannot be undone and prevents upgrades. This feature set is not recommended on production clusters.

The following Technology Preview features are enabled by this feature set:

Enabling feature sets using the web console

You can use the OKD web console to enable feature sets for all of the nodes in a cluster by editing the FeatureGate custom resource (CR).

Procedure

To enable feature sets:

  1. In the OKD web console, switch to the AdministrationCustom Resource Definitions page.

  2. On the Custom Resource Definitions page, click FeatureGate.

  3. On the Custom Resource Definition Details page, click the Instances tab.

  4. Click the cluster feature gate, then click the YAML tab.

  5. Edit the cluster instance to add specific feature sets:

    Sample Feature Gate custom resource

    1. apiVersion: config.openshift.io/v1
    2. kind: FeatureGate
    3. metadata:
    4. name: cluster (1)
    5. ....
    6. spec:
    7. featureSet: TechPreviewNoUpgrade (2)
    1The name of the FeatureGate CR must be cluster.
    2Add the feature sets that you want to enable in a comma-separated list:
    • IPv6DualStackNoUpgrade enables the dual-stack networking mode.

    • TechPreviewNoUpgrade enables specific Technology Preview features.

    Enabling the TechPreviewNoUpgrade or IPv6DualStackNoUpgrade feature sets cannot be undone and prevents upgrades. These feature sets are not recommended on production clusters.

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).

Prerequisites

  • You have installed the OpenShift CLI (oc).

Procedure

To enable feature sets:

  1. Edit the FeatureGate CR named cluster:

    1. $ oc edit featuregate cluster

    Sample FeatureGate custom resource

    1. apiVersion: config.openshift.io/v1
    2. kind: FeatureGate
    3. metadata:
    4. name: cluster (1)
    5. spec:
    6. featureSet: TechPreviewNoUpgrade (2)
    1The name of the FeatureGate CR must be cluster.
    2Add the feature sets that you want to enable in a comma-separated list:
    • IPv6DualStackNoUpgrade enables the dual-stack networking mode.

    • TechPreviewNoUpgrade enables specific Technology Preview features.

    Enabling the TechPreviewNoUpgrade or IPv6DualStackNoUpgrade feature sets cannot be undone and prevents upgrades. These feature sets are not recommended on production clusters.