Advanced Cluster Management Multicluster Application

Finally, you are going to check if your applications are fault tolerant. In this LAB, you have deployed four applications:

  1. rhte2023-application-01: Deployed on both clusters.

  2. rhte2023-application-02: Deployed on the remote cluster.

  3. rhte2023-application-03: Deployed on the remote cluster.

  4. rhte2023-application-04: Deployed on the cluster with less resources available.

Now, we are going to hibernate the rhte2023-cluster01 cluster to check if the applications are fault tolerant.

As the rhte2023-application-01 application is on both clusters, this application is going to lose one of the replicas. The rhte2023-application02 and rhte2023-application03 applications are running in the rhe2023-cluster01 cluster, but the applications can not run on any OpenShift clusters. So, both applications are not going to be available after hibernating the cluster. Finally, the rhte2023-application-04 is running on the rhte2023-cluster01 but can run on any cluster. So, this applications will be moved after hibernating the rhte2023-cluster01 cluster.

You can check the rhte2023-application-04 application status in Red Hat Advanced Cluster Management web interface. You can go into "Applications" section and search for "rhte2023-application-04". You will see that the application is running on 1 Remote cluster.

hibernate01

Hibernate the cluster using the web interface

To hibernate the cluster, you need to enter into the Red Hat Advanced Cluster Management web interface route first. You can find it in the open-cluster-management namespace.

After entering into Red Hat Advanced Cluster Management web interface, you need to enter into the "Infrastructure" → "Clusters" section.

You should click into the three dot button on the bottom right to get the cluster options.

hibernate02

Now, you can select "Hibernate cluster".

hibernate03

The next page will ask for Hibernate confirmation. You should select the "Hibernate" button.

hibernate04

You can wait some time until the cluster is hibernated. When the cluster is Hibernated, you can check that the application has moved to the Local cluster. Please, note that the application could take some time to be migrated.

hibernate05

Hibernate the cluster using the CLI

To hibernate the cluster using the CLI, you need to patch the ClusterDeployment object adding the powerState: Hibernating into the spec section. You can use this command to hibernate the cluster:

oc --context acm patch ClusterDeployment rhte2023-cluster01 -n rhte2023-cluster01 --type merge -p '{"spec":{"powerState":"Hibernating"}}'