Add private and cloud clusters
Connect and add a Kubernetes cluster
This topic explains how to bring-in your private and cloud Kubernetes clusters to Portworx BaaS.
- Portworx BaaS organization ADMIN privileges
- Helm versions 3.x.x. See the Helm documentation to install the latest Helm version.
- Ensure that Stork version 2.4.0 or newer is running on the cluster.
Connect a cluster
As a Portworx BaaS organization ADMIN, you can connect as many private and cloud clusters such as AKS, EKS, GKE, IBM and add them in the BaaS Clusters page. If you are a Freemium user, then you can add only one cluster.
To connect a Kubernetes cluster in Portworx Baas:
- In the Portwox BaaS left panel, select the Clusters icon.
In the Clusters page that appears, select Connect Cluster:
From the Connect Cluster window, select the Kubernetes or OpenShift tab. These tabs provide specific Helm command to connect the Kubernetes or OCP clusters:
Copy the Helm command:
In the CLI, navigate to the directory where your cluster exists.
Run the copied Helm command.NOTE: Do not modify this Helm command.
kubectl get nscommand to list namespaces. You can notice that a new namespace
px-platform-systemis created. This namespace includes pods such as teleport, Portworx agent, and so on.
The connected cluster is initialized to be added to the Portworx BaaS Clusters page. Wait for the Portworx agent to register the new cluster to the BaaS control plane. Once successful, the cluster status is displayed as Healthy.
Attach an existing cluster to a BaaS service
By default, the cluster that you add is not associated with any BaaS service.
To perform Backup operations on the added cluster, you need to attach a cluster to a BaaS service:
In the Portworx BaaS Clusters page -> the cluster you want to attach, select the Attach BaaS Service button:
In the Attach BaaS Service window:
- Cluster Name text box: delete the auto-generated cluster name in the text box and enter a cluster name.
- BaaS Service dropdown: from the list of BaaS services that you created as an Enterprise user, select the service to which you want to attach the cluster.
The cluster is attached to the BaaS service.
Add credentials to cloud clusters
After attaching cloud clusters to Portworx BaaS, you should select each cluster in BaaS and add cloud credentials for each cluster in the Portworx Backup UI. Without cloud credentials, you cannot use the attached cloud cluster to perform backup operations.
To add cloud credentails:
In the Portworx Backup -> Clusters page, select the cluster you want to add cloud credentails:
In the Edit Kubernetes Cluster page -> under the Cloud Account dropdown, select the Manage Credentials button:
In the Add Cloud Credentials page, enter valid credentails and then select Add.
After adding the credentails successfully, navigate to the Clusters page and select the Manage Credentials button again.
In the Edit Kubernetes Cluster page -> Cloud Account dropdown, select the added cloud credential.
Select Submit. The status of the cloud cluster is Active, and ready to use:
Perform backup operations
After attaching a cluster to service, you can use that cluster to perform all Portworx Backup specific operations:
In the Portworx BaaS -> Clusters page, select a BaaS service name to navigate to the Portworx Backup application. The Clusters page displays the cluster that you attached.
You can click on the cluster to start performing backup, restore, and other tasks.
Remove a cluster
In order to remove an existing cluster, you should first make the cluster unhealthy and then remove it.
To remove an existing cluster:
In the Clusters page -> the cluster you want to remove, select the vertical ellipsis icon and then select Initiate Cluster Remove:
In the Initiate Cluster Remove window, copy the Helm command:
On the cluster, run this Helm command to remove the Portworx agent.
The cluster status becomes Unhealthy.
Select the vertical ellipsis icon again and then select Remove Cluster.
In the Remove Cluster window that appears, select Remove.
The cluster and its all associated resources are deleted.