Red Hat Advanced Cluster Management for Kubernetes is installed using an operator that deploys all of the required components.
You must meet the following requirements before you install Red Hat Advanced Cluster Management for Kubernetes:
-
Red Hat OpenShift Container Platform version 4.3, or later, must be deployed in your environment, and you must be logged into it with the CLI. See the OpenShift version 4.3 documentation or OpenShift version 4.4 documentation.
-
A StorageClass is preconfigured in Red Hat OpenShift Container Platform, and is available to create storage for Red Hat Advanced Cluster Management for Kubernetes.
-
Your Red Hat OpenShift Container Platform command line interface (CLI) must be version 4.3, or later, and configured to run
occommands. See Getting started with the CLI for information about installing and configuring the Red Hat OpenShift CLI. -
Your Red Hat OpenShift Container Platform permissions must allow you to create a namespace.
-
You must have an Internet connection to access the dependencies for the operator.
-
Your Red Hat OpenShift Container Platform must have access to the Red Hat Advanced Cluster Management operator in the OperatorHub catalog.
-
Create a namespace where the operator requirements are contained:
oc create namespace <namespace>Replace namespace with a name for your namespace.
Important: The Red Hat Advanced Cluster Management operator must be installed in its own namespace. A
ServiceAccountwith aClusterRoleBindingautomatically gives cluster administrator privileges to Red Hat Advanced Cluster Management and to any ID with access to the namespace. For security, make sure that anyone who is given access to this namespace already has cluster-administrator access. -
Switch your project namespace to the one that you created:
oc project <namespace>Replace namespace with the name of the namespace that you created in step 1.
-
Create an operator group. Each namespace can have only one operator group.
- Create a
.yamlfile that defines the operator group. Your file should look similar to the following example:
apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: <default> spec: targetNamespaces: - <namespace>Replace default with the name of your operator group. Replace namespace with the name of your project namespace.
- Apply the file that you created to define the operator group:
oc apply -f local/<operator-group>.yamlReplace operator-group with the name of the operator group
.yamlfile that you created. - Create a
-
Apply the subscription.
- Create a
.yamlfile that defines the subscription. Your file should look similar to the following example:
apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: acm-operator-subscription spec: sourceNamespace: openshift-marketplace source: redhat-operators channel: release-1.0 installPlanApproval: Automatic name: advanced-cluster-management- Apply the subscription:
oc apply -f local/<subscription>.yaml - Create a
-
Generate a pull secret to access the entitled content from the distribution registry. Important: Pull secrets are namespace-specific, so make sure that you are in the namespace that you created in step 1.
oc create secret docker-registry <secret> --docker-server=registry.access.redhat.com/rhacm1-tech-preview --docker-username=<docker_username> --docker-password=<docker_password>Replace secret with the name of the secret that you created. Replace docker_username with your username for the distribution registry that you identified as the
docker-server. Replace docker_password with your password or token for the distribution registry that you identified as thedocker-server. -
Create the MultiClusterHub custom resource by creating a
.yamlfile that defines the custom resource. Your file should look similar to the following example:apiVersion: operators.open-cluster-management.io/v1beta1 kind: MultiClusterHub metadata: name: multiclusterhub namespace: <namespace> spec: imagePullSecret: <secret>Replace namespace with your project namespace. Replace secret with the name of the secret that you created.
If this step fails with the following error, the resources are still being created and applied:
error: unable to recognize "./mch.yaml": no matches for kind "MultiClusterHub" in version "operators.open-cluster- management.io/v1beta1"Run the command again in a few minutes when the resources are created.
-
View the list of routes after about 10 minutes to find your route:
oc get routes
-
Create a namespace for the operator requirements:
-
In the Red Hat OpenShift Container Platform console navigation, select Administration > Namespaces.
-
Select Create Namespace.
-
Provide a name for your namespace. This is the namespace that you use throughout the installation process.
-
Select Create.
Important: The Red Hat Advanced Cluster Management operator must be installed in its own namespace. A
ServiceAccountwith aClusterRoleBindingautomatically gives cluster administrator privileges to Red Hat Advanced Cluster Management and to any ID with access to the namespace. For security, make sure that anyone who is given access to this namespace already has cluster-administrator access. -
-
Switch your project namespace to the one that you created in step 1. This ensures that the steps are completed in the correct namespace. Some resources are namespace-specific.
-
In the Red Hat OpenShift Container Platform console navigation, select Administration > Namespaces.
-
In the Projects field, select the namespace that you created in step 1 from the dropdown list.
-
-
Create a pull secret that provides the entitlement to the downloads.
-
In the Red Hat OpenShift Container Platform console navigation, select Workloads > Secrets.
-
Select Create > Image Pull Secret.
-
Enter a name for your secret.
-
Select Image Registry Credentials as the authentication type.
-
In the Registry Server Address field, enter the address of the distribution registry that contains your image. In most cases, it is
registry.access.redhat.com/rhacm1-tech-preview. -
Enter your username and password or token for the distribution registry that contains the image.
-
Select Create to create the pull secret.
-
-
Subscribe to the operator.
-
In the Red Hat OpenShift Container Platform console navigation, select Operators > OperatorHub.
-
Select Red Hat Advanced Cluster Management. Tip: You can filter on the Integration & Delivery category to narrow the choices.
-
Select Install.
-
Update the values, if necessary.
-
Select Subscribe.
-
-
Create the MultiClusterHub custom resource.
-
In the Red Hat OpenShift Container Platform console navigation, select Installed Operators > MultiClusterHub.
-
Select the MultiClusterHub tab.
-
Select Create MultiClusterHub.
-
Update the default values in the
.yamlfile, according to your needs. The following example shows some sample data:
apiVersion: operators.open-cluster-management.io/v1beta1 kind: MultiClusterHub metadata: name: multiclusterhub namespace: <namespace> spec: imagePullSecret: <secret>Replace secret with the name of the pull secret that you created. Confirm that the namespace is your project namespace.
-
-
Select Create to initialize the custom resource. It can take up to 10 minutes for the hub to build and start.
After the hub is created, the status for the operator is *Running* on the *Installed Operators* page.
-
Access the console for the hub.
-
In the Red Hat OpenShift Container Platform console navigation, select Networking > Routes.
-
View the URL for your hub in the list, and navigate to it to access the console for your hub.
-