Install Multicluster
Prerequisites
- Before you begin, read this document, Verrazzano in a multicluster environment.
- To set up a multicluster Verrazzano environment, you will need two or more Kubernetes clusters. One of these clusters will be admin cluster; the others will be managed clusters. For instructions on preparing Kubernetes platforms for installing Verrazzano, see Platform Setup.
NOTE
If Rancher is not enabled, then refer to Verrazzano multicluster installation without Rancher because additional steps are required to register a managed cluster.The following instructions assume an admin cluster and a single managed cluster. For each additional managed cluster, simply repeat the managed cluster instructions.
Install Verrazzano
To install Verrazzano on each Kubernetes cluster, complete the following steps:
- On one cluster, install Verrazzano using the
devorprodprofile; this will be the admin cluster. - On the other cluster, install Verrazzano using the
managed-clusterprofile; this will be a managed cluster. Themanaged-clusterprofile contains only the components that are required for a managed cluster.
NOTE: You also can use thedevorprodprofile.
For detailed instructions on how to install and customize Verrazzano on a Kubernetes cluster using a specific profile, see the Installation Guide and Installation Profiles.
Register managed clusters using the console
To register a cluster, complete the following steps:
-
Enable
syncClusters.
For information aboutsyncClusters, see Enable syncClusters.kubectl apply -f - <<EOF apiVersion: install.verrazzano.io/v1beta1 kind: Verrazzano metadata: name: admin spec: profile: prod components: clusterOperator: overrides: - values: syncClusters: enabled: true EOF -
On the admin cluster, open the Rancher console.
You can find the Rancher console URL for your cluster by following the instructions here. -
Select Cluster Management, and then click Import Existing Cluster.
-
Provide a name for your managed cluster, for example, managed1.
-
Optional. In your Verrazzano configuration, if you specified a cluster label selector, then under Labels & Annotations provide the
labelandvaluefor the cluster. Thelabelandvalueinformation must match the cluster selectionmatchExpressionin your Verrazzano configuration for selective cluster registration to occur. -
Click Create.
-
On the next screen, follow the on-screen instructions to complete the registration by running the provided command against the managed cluster.
After the cluster reaches the Active state in the console, synchronization with Verrazzano will happen automatically and a VerrazzanoManagedCluster resource will be created in the verrazzano-mc namespace.
Run the following command to view the details and status of Verrazzano’s multicluster initialization operations:
$ kubectl get vmc -n verrazzano-mc <Rancher_cluster_name> -o yaml
For more information, see Registering Existing Clusters in the Rancher documentation.
NOTE: You can also register managed clusters using kubectl, see Register Managed Clusters using kubectl.
Next steps
- Verify your multicluster Verrazzano environment set up by following the instructions at Verify Multicluster Installation.
- Deploy multicluster example applications. See Examples of using Verrazzano in a multicluster environment.