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.
After adding a cluster, no other user in an organization can add the same cluster to Portworx BaaS.
Attach an existing cluster to a BaaS service
By default, the cluster that you add is not associated with any BaaS service.
You can attach each cluster to only one 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: Specify a name for the cluster.
- BaaS Service dropdown: Lists all the Enterprise services that you created. From the list, 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.
You do not need to add cloud credentials for the on-premises clusters.
To add cloud credentails:
In the Portworx Backup -> Clusters page, select the vertical ellipsis button on the cluster you want to add clous credentials and then select Edit.cluster you want to add cloud credentails:
In the Edit Kubernetes Cluster page -> K8s Cluster Details section, choose GKE.
Below 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.
Ensure to remove any backup schedules associated with the cluster you want to remove.
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.