Configuring Kasten Multi-Cluster Manager across Tanzu and OpenShift
Tags: kubernetes, vmware, configure, kasten
Published: 2021-08-09 21:47:15

---
title: Configuring Kasten Multi-Cluster Manager across Tanzu and OpenShift
published: true
date: 2021-08-06 14:40:41 UTC
tags: Kubernetes,VMware,Configure,Kasten
canonical_url: https://veducate.co.uk/kasten-multi-cluster/?utm_source=rss&utm_medium=rss&utm_campaign=kasten-multi-cluster
---

In this blog post I’m going to cover setting up the Multi-cluster support for Kasten when you’ve installed the software to multiple Kubernetes clusters.

One K10 cluster you have deployed will become the primary node. You will use this node and dashboard interface to access the cluster UI.

- The _primary_ cluster defines policies and other configuration centrally. Centrally defined policies and configuration can then be distributed to designated clusters to be enacted.

Additional clusters are then added in and are called Secondaries.

- The _secondary_ clusters receive policies and other configuration from the _primary_ cluster. Once policies are distributed to a _secondary_, the local K10 installation enacts the policy. This ensures that the policy will continue to be enforced, even if disconnected from the _primary_.

Pre-Requisites:

- Authentication
  - Token Authentication must be used
- Network
  - Secondary K10’s ingress must be accessible by the primary
  - Secondary API Server must be accessible by the primary
- Run the tool on a bastion host that has connectivity using kubectl to all of the clusters you want to bring together.

###### Download the K10MultiCluster tool

- Download the appropriate version of the tool to match your K10 versions
  - [https://github.com/kastenhq/external-tools/releases](https://github.com/kastenhq/external-tools/releases)

- Set the tool as executable
- Move the tool to your /usr/local/bin/ folder

```
curl -LJO https://github.com/kastenhq/external-tools/releases/download/4.0.9/k10multicluster_4.0.9_linux_amd64

chmod +x k10multicluster_4.0.9_linux_amd64

sudo mv k10multicluster_4.0.9_linux_amd64 /usr/local/bin/k10multicluster
```

[![Download K10Multicluster](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/Download-K10Multicluster.jpg?resize=604%2C217&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/Download-K10Multicluster.jpg?ssl=1)

Next let’s list out our available clusters we can connect to from our node

```
kubectl config get-contexts
```

[![kubectl config get-contexts](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/kubectl-config-get-contexts.jpg?resize=604%2C64&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/kubectl-config-get-contexts.jpg?ssl=1)

###### Setup Primary Cluster

Now we are ready to setup our primary cluster by running the following command:

```
k10multicluster setup-primary \
--context=<primary_cluster_context_name> \
--name=<primary_cluster_name>

# My Demo example

k10multicluster setup-primary --context=tkg-wld-01-admin@tkg-wld-01-admin --name=tkg-wld-01-admin
```

[![k10multicluster setup-primary](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10multicluster-setup-primary.jpg?resize=604%2C56&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10multicluster-setup-primary.jpg?ssl=1)

If I visit the UI on the Primary Cluster dashboard, I will see the cluster option:

[![k10 dashboard - clusters](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10-dashboard-clusters.jpg?resize=604%2C76&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10-dashboard-clusters.jpg?ssl=1)

###### Setup Secondary Cluster

Now we continue to configure my secondary clusters using the bootstrap argument:

```
k10multicluster bootstrap \
    --primary-context=<primary_cluster_context_name> \
    --primary-name=<primary_cluster_name> \
    --secondary-context=<secondary_cluster_context_name> \
    --secondary-name=<secondary_cluster_name> \
    --secondary-cluster-ingress=<secondary_ingress>/<k10_endpoint>

# My Demo Example

k10multicluster bootstrap \
 --primary-context=tkg-wld-01-admin@tkg-wld-01 \
 --primary-name=tkg-wld-01-admin \
 --secondary-context=tkg-wld-02-admin@tkg-wld-02 \
 --secondary-name=tkg-wld-02-admin \
 --secondary-cluster-ingress=http://192.168.200.58/k10
```

[![k10multicluster bootstrap](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10multicluster-bootstrap.jpg?resize=595%2C275&ssl=1)](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10multicluster-bootstrap.jpg?ssl=1)

Now when you visit your Primary Cluster Dashboard, you will see the clusters added. You may have a message about setting up the permissions to a second cluster if the tool has been unsuccessful in its initial configuration. This can be rectified in the UI as per the below screenshot, Kasten even helpful populates the configuration for you.

[![k10 dashboard - clusters - grant permissions - pre-filed form - Add k10 Cluster Role Binding](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10-dashboard-clusters-grant-permissions-pre-filed-form-Add-k10-Cluster-Role-Binding.jpg?resize=604%2C302&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10-dashboard-clusters-grant-permissions-pre-filed-form-Add-k10-Cluster-Role-Binding.jpg?ssl=1)

[![k10 cluster role binding created successfully](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10-cluster-role-binding-created-successfully.jpg?resize=300%2C38&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10-cluster-role-binding-created-successfully.jpg?ssl=1)

[![k10 - Global k10 Resources - User Permissions](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10-Global-k10-Resources-User-Permissions.jpg?resize=604%2C434&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10-Global-k10-Resources-User-Permissions.jpg?ssl=1)

You can also add clusters in directly in the UI by uploading your kubeconfig file.

[![k10 multi cluster - add clusters in the UI](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10-multi-cluster-add-clusters-in-the-UI.jpg?resize=604%2C867&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10-multi-cluster-add-clusters-in-the-UI.jpg?ssl=1)

###### Configuring Global Policies

By creating the multi-cluster configuration, we enable the ability to have centralised global configurations. Above we touched on the first Global configuration, permissions. Other areas that can be configured Globally are:

- Profiles
  - These are the location and infrastructure profiles to define where data is held externally from the Kubernetes cluster, and the platform hosting the Kubernetes cluster.
- Policies
  - This is the protection policy configuration to select artifacts and set the schedule, and where the protected data is stored.
- Distributions
  - Provide a way to describe the relationship between globally defined resources and the clusters to which they should be distributed

We can also see on the home screen the data usage across all clusters as well as recent activity.

For my example, I’m going to configure a location and infrastructure policy, a protection policy, then a distribution to push this two of my clusters. As the first policies are the same as configuring on a local k10 cluster. I will simply show the screenshots, you can find more [details here](https://veducate.co.uk/kasten-backup-restore/).

[![K10 Multi-Cluster - Global Policies - Configure Location and infrastructure profile](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Configure-Location-and-infrastructure-profile.jpg?resize=604%2C622&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Configure-Location-and-infrastructure-profile.jpg?ssl=1)

[![K10 Multi-Cluster - Global Policies - Configure Data Protection Policy](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Configure-Data-Protection-Policy.jpg?resize=604%2C599&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Configure-Data-Protection-Policy.jpg?ssl=1)

Now to configure a distribution policy to push these settings to my K10 clusters, one Tanzu Kubernetes Grid Cluster and one OpenShift Cluster.

- Select your clusters from either labels or the cluster objects
- Select the resources available as necessary and click “Add Distribution”

 

[![K10 Multi-Cluster - Global Policies - Configure Distribution Policy](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Configure-Distribution-Policy.jpg?resize=604%2C427&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Configure-Distribution-Policy.jpg?ssl=1)

You will then see the policy object, and the status will change once the sync has completed to each of the clusters.

[![K10 Multi-Cluster - Global Policies - Configure Distribution Policy - Status](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Configure-Distribution-Policy-Status.jpg?resize=604%2C286&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Configure-Distribution-Policy-Status.jpg?ssl=1)

If I click into each of my clusters, I can now see the policies have been pushed.

[![K10 Multi-Cluster - Global Policies - Sync successful - cluster 1](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Sync-successful-cluster-1.jpg?resize=604%2C413&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Sync-successful-cluster-1.jpg?ssl=1)

[![K10 Multi-Cluster - Global Policies - Sync successful - cluster 2](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Sync-successful-cluster-2.jpg?resize=604%2C588&ssl=1)](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/08/K10-Multi-Cluster-Global-Policies-Sync-successful-cluster-2.jpg?ssl=1)

###### Disconnect a Secondary Cluster

Removing a cluster from the Multi-Cluster dashboard is quite easy, but can only be completed using the CLI Tool.

```
k10multicluster disconnect \
    --primary-context=<primary_cluster_context_name> \
    --primary-name=<primary_cluster_name> \
    --secondary-context=<secondary_cluster_context_name> \
    --secondary-name=<secondary_cluster_name>

# My Demo Example

k10multicluster disconnect \
--primary-context=tkg-wld-01-admin@tkg-wld-01 \
--primary-name=tkg-wld-01-admin \
--secondary-context=tkg-wld-02-admin@tkg-wld-02 \
--secondary-name=tkg-wld-02-admin 

```

[![k10multi-cluster disconnect](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10multi-cluster-disconnect.jpg?resize=604%2C176&ssl=1)](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/08/k10multi-cluster-disconnect.jpg?ssl=1)

###### Wrap Up

Setting up the Multi-Cluster feature for Kasten is quite easy. I like how it’s proxied via a primary cluster as well. Meaning I only need to make one UI externally accessible to my users. If needed, I could setup an “empty” K10 instance that is used as the primary, to connect to all my K10 instances for each cluster which is deployed to protect data.

As usual, the Kasten documentation is simple and easy to follow. I only created this post to add some colour, images, and examples.

You can find my other Kasten Blog posts & recordings below:

- How to Install and Configure Kasten:
  - [Tanzu Kubernetes Grid](https://veducate.co.uk/kasten-tanzu/)
  - [Red Hat OpenShift](https://veducate.co.uk/kasten-backup-restore/)
- [How to backup and restore your container workloads using Kasten](https://veducate.co.uk/kasten-backup-restore/)
- [How to update Kasten to the latest version](https://veducate.co.uk/how-to-update-kasten-to-the-latest-version/)
- VMUG Recording – [Protecting your Tanzu Kubernetes Workload with Kasten by Veeam](https://veducate.co.uk/vmug-recording-protecting-your-tanzu-kubernetes-workload-with-kasten-by-veeam/)
- Tanzu Mission Control – [Using custom policies to ensure Kasten protects a deployed application](https://veducate.co.uk/tanzu-mission-control-custom-policy-kasten/)

Regards

[Follow @Saintdle](https://twitter.com/saintdle)<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

[Dean Lewis](https://uk.linkedin.com/in/saintdle?trk=profile-badge)

 

The post [Configuring Kasten Multi-Cluster Manager across Tanzu and OpenShift](https://veducate.co.uk/kasten-multi-cluster/) appeared first on [vEducate.co.uk](https://veducate.co.uk).