Activating feature gates

KubeVirt has a set of features that are not mature enough to be enabled by default. As such, they are protected by a Kubernetes concept called feature gates.

How to activate a feature gate

You can activate a specific feature gate directly in KubeVirt’s CR, by provisioning the following yaml, which uses the LiveMigration feature gate as an example:

  1. cat << END > enable-feature-gate.yaml
  2. ---
  3. apiVersion: kubevirt.io/v1
  4. kind: KubeVirt
  5. metadata:
  6. name: kubevirt
  7. namespace: kubevirt
  8. spec:
  9. configuration:
  10. developerConfiguration:
  11. featureGates:
  12. - LiveMigration
  13. END
  14. kubectl apply -f enable-feature-gate.yaml

Alternatively, the existing kubevirt CR can be altered:

  1. kubectl edit kubevirt kubevirt -n kubevirt
  1. ...
  2. spec:
  3. configuration:
  4. developerConfiguration:
  5. featureGates:
  6. - DataVolumes
  7. - LiveMigration

Note: the name of the feature gates is case sensitive.

The snippet above assumes KubeVirt is installed in the kubevirt namespace. Change the namespace to suite your installation.

List of feature gates

The list of feature gates (which evolve in time) can be checked directly from the source code.