Enabling or disabling the hosted control planes feature
The hosted control planes feature, as well as the hypershift-addon managed cluster add-on, are enabled by default. If you want to disable the feature, or if you disabled it and want to manually enable it, see the following procedures.
Manually enabling the hosted control planes feature
If you need to manually enable hosted control planes, complete the following steps.
-
Run the following command to enable the feature:
$ oc patch mce multiclusterengine --type=merge -p \ '{"spec":{"overrides":{"components":[{"name":"hypershift","enabled": true}]}}}'- The default
MultiClusterEngineresource instance name ismulticlusterengine, but you can get theMultiClusterEnginename from your cluster by running the following command:$ oc get mce.
- The default
-
Run the following command to verify that the
hypershiftandhypershift-local-hostingfeatures are enabled in theMultiClusterEnginecustom resource:$ oc get mce multiclusterengine -o yaml- The default
MultiClusterEngineresource instance name ismulticlusterengine, but you can get theMultiClusterEnginename from your cluster by running the following command:$ oc get mce.Example outputapiVersion: multicluster.openshift.io/v1 kind: MultiClusterEngine metadata: name: multiclusterengine spec: overrides: components: - name: hypershift enabled: true - name: hypershift-local-hosting enabled: true
- The default
Manually enabling the hypershift-addon managed cluster add-on for local-cluster
Enabling the hosted control planes feature automatically enables the hypershift-addon managed cluster add-on. If you need to enable the hypershift-addon managed cluster add-on manually, complete the following steps to use the hypershift-addon to install the HyperShift Operator on local-cluster.
-
Create the
ManagedClusterAddonadd-on namedhypershift-addonby creating a file that resembles the following example:apiVersion: addon.open-cluster-management.io/v1alpha1 kind: ManagedClusterAddOn metadata: name: hypershift-addon namespace: local-cluster spec: installNamespace: open-cluster-management-agent-addon -
Apply the file by running the following command:
$ oc apply -f <filename>Replace
filenamewith the name of the file that you created. -
Confirm that the
hypershift-addonmanaged cluster add-on is installed by running the following command:$ oc get managedclusteraddons -n local-cluster hypershift-addonIf the add-on is installed, the output resembles the following example:
NAME AVAILABLE DEGRADED PROGRESSING hypershift-addon True
Your hypershift-addon managed cluster add-on is installed and the hosting cluster is available to create and manage hosted clusters.
Disabling the hosted control planes feature
You can uninstall the HyperShift Operator and disable the hosted control planes feature. When you disable the hosted control planes feature, you must destroy the hosted cluster and the managed cluster resource on multicluster engine Operator, as described in the Managing hosted clusters topics.
Uninstalling the HyperShift Operator
To uninstall the HyperShift Operator and disable the hypershift-addon from the local-cluster, complete the following steps:
-
Run the following command to ensure that there is no hosted cluster running:
$ oc get hostedcluster -AImportant
If a hosted cluster is running, the HyperShift Operator does not uninstall, even if the
hypershift-addonis disabled. -
Disable the
hypershift-addonby running the following command:$ oc patch mce multiclusterengine --type=merge -p \ '{"spec":{"overrides":{"components":[{"name":"hypershift-local-hosting","enabled": false}]}}}'- The default
MultiClusterEngineresource instance name ismulticlusterengine, but you can get theMultiClusterEnginename from your cluster by running the following command:$ oc get mce.Note
You can also disable the
hypershift-addonfor thelocal-clusterfrom the multicluster engine Operator console after disabling thehypershift-addon.
- The default
Disabling the hosted control planes feature
To disable the hosted control planes feature, complete the following steps.
-
You uninstalled the HyperShift Operator. For more information, see "Uninstalling the HyperShift Operator".
-
Run the following command to disable the hosted control planes feature:
$ oc patch mce multiclusterengine --type=merge -p \ '{"spec":{"overrides":{"components":[{"name":"hypershift","enabled": false}]}}}'- The default
MultiClusterEngineresource instance name ismulticlusterengine, but you can get theMultiClusterEnginename from your cluster by running the following command:$ oc get mce.
- The default
-
You can verify that the
hypershiftandhypershift-local-hostingfeatures are disabled in theMultiClusterEnginecustom resource by running the following command:$ oc get mce multiclusterengine -o yaml- The default
MultiClusterEngineresource instance name ismulticlusterengine, but you can get theMultiClusterEnginename from your cluster by running the following command:$ oc get mce.See the following example where
hypershiftandhypershift-local-hostinghave theirenabled:flags set tofalse:apiVersion: multicluster.openshift.io/v1 kind: MultiClusterEngine metadata: name: multiclusterengine spec: overrides: components: - name: hypershift enabled: false - name: hypershift-local-hosting enabled: false
- The default