sigs.k8s.io/cluster-api@v1.7.1/docs/book/src/tasks/experimental-features/experimental-features.md (about) 1 # Experimental Features 2 3 Cluster API now ships with a new experimental package that lives under the `exp/` directory. This is a 4 temporary location for features which will be moved to their permanent locations after graduation. Users can experiment with these features by enabling them using feature gates. 5 6 ## Enabling Experimental Features for Management Clusters Started with clusterctl 7 8 Users can enable/disable features by setting OS environment variables before running `clusterctl init`, e.g.: 9 10 ```yaml 11 export EXP_SOME_FEATURE_NAME=true 12 13 clusterctl init --infrastructure vsphere 14 ``` 15 16 As an alternative to environment variables, it is also possible to set variables in the clusterctl config file located at `$XDG_CONFIG_HOME/cluster-api/clusterctl.yaml`, e.g.: 17 ```yaml 18 # Values for environment variable substitution 19 EXP_SOME_FEATURE_NAME: "true" 20 ``` 21 In case a variable is defined in both the config file and as an OS environment variable, the environment variable takes precedence. 22 For more information on how to set variables for clusterctl, see [clusterctl Configuration File](../../clusterctl/configuration.md) 23 24 Some features like `MachinePools` may require infrastructure providers to implement a separate CRD that handles the infrastructure side of the feature too. 25 For such a feature to work, infrastructure providers should also enable their controllers if it is implemented as a feature. If it is not implemented as a feature, no additional step is necessary. 26 As an example, Cluster API Provider Azure (CAPZ) has support for MachinePool through the infrastructure type `AzureMachinePool`. 27 28 ## Enabling Experimental Features for e2e Tests 29 30 One way is to set experimental variables on the clusterctl config file. For CAPI, these configs are under ./test/e2e/config/... such as `docker.yaml`: 31 ```yaml 32 variables: 33 CLUSTER_TOPOLOGY: "true" 34 EXP_RUNTIME_SDK: "true" 35 EXP_MACHINE_SET_PREFLIGHT_CHECKS: "true" 36 ``` 37 38 Another way is to set them as environmental variables before running e2e tests. 39 40 ## Enabling Experimental Features on Tilt 41 42 On development environments started with `Tilt`, features can be enabled by setting the feature variables in `kustomize_substitutions`, e.g.: 43 44 ```yaml 45 kustomize_substitutions: 46 CLUSTER_TOPOLOGY: 'true' 47 EXP_RUNTIME_SDK: 'true' 48 EXP_MACHINE_SET_PREFLIGHT_CHECKS: 'true' 49 ``` 50 51 For more details on setting up a development environment with `tilt`, see [Developing Cluster API with Tilt](../../developer/tilt.md) 52 53 ## Enabling Experimental Features on Existing Management Clusters 54 55 To enable/disable features on existing management clusters, users can edit the corresponding controller manager 56 deployments, which will then trigger a restart with the requested features. E.g. for the CAPI controller manager 57 deployment: 58 59 ``` 60 kubectl edit -n capi-system deployment.apps/capi-controller-manager 61 ``` 62 ``` 63 // Enable/disable available features by modifying Args below. 64 Args: 65 --leader-elect 66 --feature-gates=MachinePool=true,ClusterResourceSet=true 67 ``` 68 69 Similarly, to **validate** if a particular feature is enabled, see the arguments by issuing: 70 71 ```bash 72 kubectl describe -n capi-system deployment.apps/capi-controller-manager 73 ``` 74 75 Following controller manager deployments have to be edited in order to enable/disable their respective experimental features: 76 77 * [MachinePools](./machine-pools.md): 78 * [CAPI](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#capi). 79 * [CABPK](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#cabpk). 80 * [CAPD](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Providers#capd). Other [Infrastructure Providers](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Providers#infrastructure-provider) 81 might also require this. Please consult the docs of the concrete [Infrastructure Provider](https://cluster-api.sigs.k8s.io/reference/providers#infrastructure) 82 regarding this. 83 * [ClusterResourceSet](./cluster-resource-set.md): 84 * [CAPI](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#capi). 85 * [ClusterClass](./cluster-class/index.md): 86 * [CAPI](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#capi). 87 * [KCP](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#kcp). 88 * [CAPD](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Providers#capd). Other [Infrastructure Providers](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Providers#infrastructure-provider) 89 might also require this. Please consult the docs of the concrete [Infrastructure Provider](https://cluster-api.sigs.k8s.io/reference/providers#infrastructure) 90 regarding this. 91 * [Ignition Bootstrap configuration](./ignition.md): 92 * [CABPK](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#cabpk). 93 * [KCP](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#kcp). 94 * [Runtime SDK](runtime-sdk/index.md): 95 * [CAPI](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#capi). 96 97 ## Active Experimental Features 98 99 * [MachinePools](./machine-pools.md) 100 * [ClusterResourceSet](./cluster-resource-set.md) 101 * [ClusterClass](./cluster-class/index.md) 102 * [Ignition Bootstrap configuration](./ignition.md) 103 * [Runtime SDK](runtime-sdk/index.md) 104 105 **Warning**: Experimental features are unreliable, i.e., some may one day be promoted to the main repository, or they may be modified arbitrarily or even disappear altogether. 106 In short, they are not subject to any compatibility or deprecation promise.