$ oc patch mce multiclusterengine --type=merge -p \
'{"spec":{"overrides":{"components":[{"name":"hypershift","enabled": true}]}}}'
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.
If the hosted control planes feature is disabled, you can manually enable it.
Run the following command to enable the feature:
$ oc patch mce multiclusterengine --type=merge -p \
'{"spec":{"overrides":{"components":[{"name":"hypershift","enabled": true}]}}}'
The default MultiClusterEngine resource instance name is multiclusterengine, but you can get the MultiClusterEngine name from your cluster by running the following command: $ oc get mce.
Run the following command to verify that the hypershift and hypershift-local-hosting features are enabled in the MultiClusterEngine custom resource:
$ oc get mce multiclusterengine -o yaml
The default MultiClusterEngine resource instance name is multiclusterengine, but you can get the MultiClusterEngine name from your cluster by running the following command: $ oc get mce.
apiVersion: multicluster.openshift.io/v1
kind: MultiClusterEngine
metadata:
name: multiclusterengine
spec:
overrides:
components:
- name: hypershift
enabled: true
- name: hypershift-local-hosting
enabled: true
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.
Create the ManagedClusterAddon add-on named hypershift-addon by 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 filename with the name of the file that you created.
Confirm that the hypershift-addon managed cluster add-on is installed by running the following command:
$ oc get managedclusteraddons -n local-cluster hypershift-addon
If 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.
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.
Run the following command to ensure that there is no hosted cluster running:
$ oc get hostedcluster -A
|
If a hosted cluster is running, the HyperShift Operator does not uninstall, even if the |
Disable the hypershift-addon by running the following command:
$ oc patch mce multiclusterengine --type=merge -p \
'{"spec":{"overrides":{"components":[{"name":"hypershift-local-hosting","enabled": false}]}}}'
The default MultiClusterEngine resource instance name is multiclusterengine, but you can get the MultiClusterEngine name from your cluster by running the following command: $ oc get mce.
|
You can also disable the |
If you no longer use the hosted control planes feature, you can disable it.
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 MultiClusterEngine resource instance name is multiclusterengine, but you can get the MultiClusterEngine name from your cluster by running the following command: $ oc get mce.
You can verify that the hypershift and hypershift-local-hosting features are disabled in the MultiClusterEngine custom resource by running the following command:
$ oc get mce multiclusterengine -o yaml
The default MultiClusterEngine resource instance name is multiclusterengine, but you can get the MultiClusterEngine name from your cluster by running the following command: $ oc get mce.
See the following example where hypershift and hypershift-local-hosting have their enabled: flags set to false:
apiVersion: multicluster.openshift.io/v1
kind: MultiClusterEngine
metadata:
name: multiclusterengine
spec:
overrides:
components:
- name: hypershift
enabled: false
- name: hypershift-local-hosting
enabled: false