$ oc patch mce multiclusterengine --type=merge -p '{"spec":{"overrides":{"components":[{"name":"hypershift","enabled": true}]}}}' (1)
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.
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}]}}}' (1)
1 | 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 (1)
1 | 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, complete the following steps to use the hypershift-addon
to install the HyperShift Operator on local-cluster
.
Create the ManagedClusterAddon
HyperShift add-on 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
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 add-on is installed and the hosting cluster is available to create and manage hosted clusters.
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.
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 -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}]}}}' (1)
1 | 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 |
Before you disable the hosted control planes feature, you must first uninstall 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}]}}}' (1)
1 | 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 (1)
1 | 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