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 needed, you can disable the feature, or if you disabled it, you can manually enable it.
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 Destroying a hosted cluster section.
Additional resources
Manually enabling the hosted control planes feature
If the hosted control planes feature is disabled, you can manually enable it.
Procedure
-
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. -
Run the following command to verify that the
hypershiftandhypershift-local-hostingfeatures are enabled in theMultiClusterEnginecustom resource:$ oc get mce multiclusterengine -o yamlThe 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/v1kind: MultiClusterEnginemetadata:name: multiclusterenginespec:overrides:components:- name: hypershiftenabled: true- name: hypershift-local-hostingenabled: true
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, use the hypershift-addon to install the HyperShift Operator on local-cluster.
Procedure
-
Create the
ManagedClusterAddonadd-on namedhypershift-addonby creating a file that resembles the following example:apiVersion: addon.open-cluster-management.io/v1alpha1kind: ManagedClusterAddOnmetadata:name: hypershift-addonnamespace: local-clusterspec: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 PROGRESSINGhypershift-addon TrueYour
hypershift-addonmanaged cluster add-on is installed and the hosting cluster is available to create and manage hosted clusters.
Uninstalling the HyperShift Operator
Before you can disable the hosted control planes feature, you need to uninstall the HyperShift Operator and disable the hypershift-addon from the local-cluster.
Procedure
-
Run the following command to ensure that there is no hosted cluster running:
$ oc get hostedcluster -AwarningIf 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.noteYou can also disable the
hypershift-addonfor thelocal-clusterfrom the multicluster engine Operator console after disabling thehypershift-addon.
Disabling the hosted control planes feature
If you no longer use the hosted control planes feature, you can disable it.
Prerequisites
- You uninstalled the HyperShift Operator. For more information, see "Uninstalling the HyperShift Operator".
Procedure
-
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. -
You can verify that the
hypershiftandhypershift-local-hostingfeatures are disabled in theMultiClusterEnginecustom resource by running the following command:$ oc get mce multiclusterengine -o yamlThe 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/v1kind: MultiClusterEnginemetadata:name: multiclusterenginespec:overrides:components:- name: hypershiftenabled: false- name: hypershift-local-hostingenabled: false