sigs.k8s.io/cluster-api@v1.6.3/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_CLUSTER_RESOURCE_SET=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_CLUSTER_RESOURCE_SET: "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    EXP_CLUSTER_RESOURCE_SET: "true"
    34    EXP_MACHINE_POOL: "true"
    35    CLUSTER_TOPOLOGY: "true"
    36    EXP_RUNTIME_SDK: "true"
    37    EXP_MACHINE_SET_PREFLIGHT_CHECKS: "true"
    38  ```
    39  
    40  Another way is to set them as environmental variables before running e2e tests.
    41  
    42  ## Enabling Experimental Features on Tilt
    43  
    44  On development environments started with `Tilt`, features can be enabled by setting the feature variables in `kustomize_substitutions`, e.g.:
    45  
    46  ```yaml
    47  kustomize_substitutions:
    48    EXP_CLUSTER_RESOURCE_SET: 'true'
    49    EXP_MACHINE_POOL: 'true'
    50    CLUSTER_TOPOLOGY: 'true'
    51    EXP_RUNTIME_SDK: 'true'
    52    EXP_MACHINE_SET_PREFLIGHT_CHECKS: 'true'
    53  ```
    54  
    55  For more details on setting up a development environment with `tilt`, see [Developing Cluster API with Tilt](../../developer/tilt.md)
    56  
    57  ## Enabling Experimental Features on Existing Management Clusters
    58  
    59  To enable/disable features on existing management clusters, users can edit the corresponding controller manager
    60  deployments, which will then trigger a restart with the requested features. E.g. for the CAPI controller manager
    61  deployment:
    62  
    63  ```
    64  kubectl edit -n capi-system deployment.apps/capi-controller-manager
    65  ```
    66  ```
    67  // Enable/disable available features by modifying Args below.
    68      Args:
    69        --leader-elect
    70        --feature-gates=MachinePool=true,ClusterResourceSet=true
    71  ```
    72  
    73  Similarly, to **validate** if a particular feature is enabled, see the arguments by issuing:
    74  
    75  ```bash
    76  kubectl describe -n capi-system deployment.apps/capi-controller-manager
    77  ```
    78  
    79  Following controller manager deployments have to be edited in order to enable/disable their respective experimental features:
    80  
    81  * [MachinePools](./machine-pools.md):
    82    * [CAPI](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#capi).
    83    * [CABPK](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#cabpk).
    84    * [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)
    85      might also require this. Please consult the docs of the concrete [Infrastructure Provider](https://cluster-api.sigs.k8s.io/reference/providers#infrastructure)
    86      regarding this.
    87  * [ClusterResourceSet](./cluster-resource-set.md):
    88    * [CAPI](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#capi).
    89  * [ClusterClass](./cluster-class/index.md):
    90    * [CAPI](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#capi).
    91    * [KCP](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#kcp).
    92    * [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)
    93      might also require this. Please consult the docs of the concrete [Infrastructure Provider](https://cluster-api.sigs.k8s.io/reference/providers#infrastructure)
    94      regarding this.
    95  * [Ignition Bootstrap configuration](./ignition.md):
    96    * [CABPK](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#cabpk).
    97    * [KCP](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#kcp).
    98  * [Runtime SDK](runtime-sdk/index.md):
    99    * [CAPI](https://cluster-api.sigs.k8s.io/reference/glossary.html?highlight=Gloss#capi).
   100  
   101  ## Active Experimental Features
   102  
   103  * [MachinePools](./machine-pools.md)
   104  * [ClusterResourceSet](./cluster-resource-set.md)
   105  * [ClusterClass](./cluster-class/index.md)
   106  * [Ignition Bootstrap configuration](./ignition.md)
   107  * [Runtime SDK](runtime-sdk/index.md)
   108  
   109  **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.
   110  In short, they are not subject to any compatibility or deprecation promise.