Cluster

8 min read

Cluster #

Overview

BuildPiper enables you to onboard and manage existing Kubernetes clusters, including EKS, GKE, AKS, and on-premises clusters, through a centralized platform. Once a cluster is onboarded, you can manage its workloads and perform deployments. The Cluster Overview page provides visibility into the cluster’s health, resource utilization, and overall usage.

1. Supported Infrastructure #

You can onboard Kubernetes clusters running on the following platforms.

Figure 1: Supported infrastructure providers

Figure 1: Supported infrastructure providers

Swipe horizontally to view all columns →
Provider Description
AWS AWS, including managed Kubernetes such as Amazon EKS.
Azure Azure Kubernetes Service (AKS).
GCP Google Kubernetes Engine (GKE). Both standard and Autopilot clusters are supported.
LDC Clusters on on-premises or private infrastructure, such as Proxmox and OpenShift.
Oracle Kubernetes clusters hosted on Oracle Cloud Infrastructure.
Alibaba Kubernetes clusters on Alibaba Cloud container service.
IBM Kubernetes clusters on IBM Cloud Kubernetes Service.
Linode Linode Kubernetes Engine, now part of Akamai Technologies.
Huawei Kubernetes clusters on Huawei Cloud container engine.

2. Prerequisites #

Swipe horizontally to view all columns →
Requirement Details
Kubernetes version 1.25 or later. BuildPiper works with versions 1.25 to 1.35, including managed Kubernetes services from all leading cloud providers.
Cluster access Cluster admin access, and the cluster KUBECONFIG file.
BuildPiper access BuildPiper Admin Console access.
Network Outbound internet access enabled, for agent communication.
kubectl Installed locally. Optional, used for validation.

Before you start onboarding, cross-check that the following prerequisites are met.

Swipe horizontally to view all columns →
Prerequisite Description
RBAC Permissions Check that the required RBAC permissions are available via the Kube config file used to onbard the cluster and configured for BuildPiper to access the cluster.
Static Kubernetes Credentials Generate static Kubernetes credentials to establish a secure and persistent connection between BuildPiper and the Kubernetes API server.
GCP Network Policy On Google Cloud (GKE), delete the network policy that blocks BuildPiper from communicating with the cluster. See the post-requisites in section 3.2.

2.1 Required RBAC Permissions #

BuildPiper requires specific permissions to access and manage resources in the onboarded Kubernetes cluster. These permissions are provided through the KUBECONFIG file used during onboarding, which defines the credentials and access privileges for connecting to the cluster. For successful onboarding, ensure that the KUBECONFIG file has the necessary permissions. Refer to Section 7 for the complete list of required permissions.

2.2 Static Kubernetes Token Generation #

Authentication requires a long-lived Kubernetes token associated with a dedicated Service Account. This token enables BuildPiper to maintain a reliable and secure connection with the Kubernetes API server, ensuring uninterrupted monitoring and cluster management.

Since cloud-provider-generated KUBECONFIG files typically rely on dynamically generated credentials, BuildPiper requires a KUBECONFIG file configured with static credentials to support persistent authentication.

Pre-requisites: kubectl is installed and configured on the BuildPiper VM, and you have administrative access to the cluster to create Service Accounts and Cluster Roles.

  1. 1

    Clone the BuildPiper repository: https://bitbucket.org/okts/k8s-ro-user.git

  2. 2

    Run the token generation script: bash /k8s-ro-user/admin/setupAdminUser.sh (the script is shown in section 6).

  3. 3

    Validate the updated kube-config generated at: ~/.kube/config-sa-admin.yaml

3. Onboard a Cluster #

Figure 2: Navigation to Add Cluster

Figure 2: Navigation to Add Cluster

  1. 1

    Login to BuildPiper.

  2. 2

    Make sure you are in the Super Admin area.

  3. 3

    Click Dashboard. The Kubernetes Clusters page opens.

  4. 4

    Click + ADD CLUSTER. The Onboard your kubernetes Cluster page opens.

  5. 5

    Fill in the cluster details (see the fields below).

  6. 6

    Click APPLY MANIFEST. Once the manifest is applied, the onboarded cluster is shown in the UI.

Figure 3: BuildPiper login page

Figure 3: BuildPiper login page

Figure 4: Onboard your kubernetes Cluster

Figure 4: Onboard your kubernetes Cluster

Swipe horizontally to view all columns →
Field Description
Give a name to your cluster A name for the cluster in BuildPiper.
Upload KubeConfig file Upload the KUBECONFIG file of the cluster.
Choose Infra Provider Select the cloud provider of the cluster: AWS, Azure, GCP, LDC, Oracle, Alibaba, IBM, Linode or Huawei.
Setup metric server post cluster onboarding Install and configure the Kubernetes Metrics Server after cluster onboarding to enable resource usage monitoring, including CPU and memory utilization.
CANCEL Closes the page without onboarding.
APPLY MANIFEST Applies the manifest and starts the onboarding.

Note: Admin privileges are required to access this page. Keep the cluster KUBECONFIG file ready before you start. To see the permissions BuildPiper needs, click View required Permissions on the page (also listed in section 7).

3.1 Onboarding Checks #

After you apply the manifest, BuildPiper runs these checks. When all of them show SUCCESS, the cluster is onboarded.

Swipe horizontally to view all columns →
Check What it does
Validating the Config file Validates the uploaded KUBECONFIG file.
Adding Prerequisite Manifest Adds the prerequisite manifest to the cluster.
Check API Server Connectivity Checks that BuildPiper can reach the cluster API server.
Check Permissions Checks that the KUBECONFIG has the required permissions.
Fetching Cluster Basic Information Fetches the basic details of the cluster.

Click VIEW LOGS to see the logs, or FINISH SETUP to complete the setup.

Figure 5: Cluster onboarded successfully

Figure 5: Cluster onboarded successfully

3.2 Post-requisites: GKE Network Policy Deletion #

GKE only: In GKE-managed clusters, some network policies may be created automatically after BuildPiper onboards the cluster. A new network policy can block BuildPiper from communicating with the cluster. Audit and remove these restrictive policies manually, to keep the connection working.

  1. 1

    Find the existing network policies in all namespaces: kubectl get networkpolicy -A

  2. 2

    Delete the policies that interfere with the BuildPiper integration by doing manually

4. Validate Communication with the Cluster #

From the BuildPiper VM, use kubectl to verify connectivity to the Kubernetes cluster and confirm that the KUBECONFIG file provides valid authentication and the required permissions. This step helps identify connectivity, authentication, or authorization issues before proceeding with cluster onboarding.

  1. 1

    Export the valid KUBECONFIG file, for example: export KUBECONFIG=~/.kube/<cluster-folder>/config

  2. 2

    Fetch the cluster version: kubectl version –short

  3. 3

    Check the nodes: kubectl get nodes. If all nodes show Ready, your cluster is connected to BuildPiper.

Figure 6: Verify client and server version

Figure 6: Verify client and server version

Note: A version skew warning is expected when the kubectl client version differs from the server by more than one minor version. It does not block cluster operations in BuildPiper.

Figure 7: Set KUBECONFIG and verify nodes

Figure 7: Set KUBECONFIG and verify nodes

5. Cluster Overview #

Click the onboarded cluster under Infra Inventory > Kubernetes Cluster to open its Cluster Overview.

Figure 8: Cluster Overview

Figure 8: Cluster Overview

5.1 Cluster Details #

Swipe horizontally to view all columns →
Item Description
Cluster name and status The cluster name with its status, for example CONNECTED.
Namespace Total number of namespaces in the cluster.
Kubernetes Version The control plane version reported by the Kubernetes API server.
Controller-manager, Scheduler, Etcd-0 Health of the control plane components (HEALTHY or UNHEALTHY).
DELETE Removes the cluster from BuildPiper.

5.2 Setup Summary #

Swipe horizontally to view all columns →
Section Description
Cloud Details The cloud provider, cluster type and operating system.
Nodes Count of master and worker nodes, with how many are Healthy and Unhealthy.
Resource Utilization CPU and memory use of the whole cluster, as a percentage of the total allocatable resources, with the Utilized / Allocated values.
Ingress Manage external access to the services in your cluster. Use CONFIGURE PUBLIC INGRESS or CONFIGURE PROTECTED INGRESS.
Keda, Istio Expandable sections on the same page.

5.3 Cluster Health Dashboard #

After a cluster is onboarded, the Cluster Health Dashboard gives a quick view of cluster stability and resource usage. It shows the following.

Swipe horizontally to view all columns →
Component Description
Control Plane Health Status of the essential cluster components, including etcd, CoreDNS and the Controller Manager, to confirm the core of the cluster is working.
Cluster Metadata The control plane version (for example v1.28.x), as reported by the Kubernetes API server.
K8s Cluster Resource Utilization Metrics Real-time graphs of CPU and memory (RAM) use across the whole cluster, as a percentage of the total allocatable resources.
Node Infrastructure Summary of the node pool: the count of worker nodes and their state (Healthy / Unhealthy).
Namespace Topology Total number of namespaces in the cluster.

6. Additional Notes #

Swipe horizontally to view all columns →
Topic Details
Troubleshooting For cloud instances, make sure the KUBECONFIG has the access needed to communicate with the Kubernetes cluster. To know more about the permissions BuildPiper needs for Kubernetes interaction, see section 7.
OpenShift For an OpenShift cluster, the setupAdminUser.sh script may need to be updated. Replace all kubectl commands with the oc equivalent.
Cluster types On GCP you can use both standard and Autopilot clusters. You can also onboard Kubernetes clusters running on LDC environments such as Proxmox, OpenShift and similar platforms.
Figure 9: setupAdminUser.sh (standard, kubectl)

Figure 9: setupAdminUser.sh (standard, kubectl)

Figure 10: setupAdminUser.sh (OpenShift, oc variant)

Figure 10: setupAdminUser.sh (OpenShift, oc variant)

7. Kubernetes Permissions Required by BuildPiper #

BuildPiper needs the following permissions on the cluster to work with Kubernetes. Make sure the KUBECONFIG you upload has them.

Swipe horizontally to view all columns →
Functionality Sub Functionality Resources Verbs Details
Deploy · Service UI Deployment deployments (apps) get, list, create, update, patch, delete  
  Service services (core) get, list, create, update, patch, delete  
  HPA hpa (autoscaling) create, update, patch, delete  
  Ingress ingress (networking.k8s.io) get, list, create, update, patch, delete  
  Secret (TLS secret) secret (core) get, list, create, update, patch, delete Rarely used
  Pod pods (core) create, update, patch, delete  
  ConfigMap configmap (core) get, list Used as environment and/or volume
  Secret secret (core) get, list Used as environment and/or volume
Deploy · Service View Deployment deployments (apps) get, list, update, patch Patch/update used when scaling pods or restarting from the UI
  ReplicaSet replicasets (apps) get, list, update, patch Changed indirectly during pod scaling
  Pods pods (core) get, list, update, patch Changed indirectly during pod scaling
  Pod logs pods/log (core) get, list, update, patch  
  Pod exec pods/exec (core) get, list, create  
  Event events (core) get, list Not used by BuildPiper, can be skipped
Deploy · Environment ConfigMap configmaps (core) get, list, create, update, patch, delete  
  Secret secrets (core) get, list, create, update, patch, delete  
Admin UI · Namespace Namespace namespace (core) get, list, create, update, patch, delete  
  ResourceQuota namespace (core) get, list, create, update, patch, delete  
  Secret secrets (core) get, list, create, update, patch, delete Docker config secret for private registry support
  NetworkPolicy networkpolicy (networking.k8s.io) get, list, create, update, patch, delete  
Admin UI · Ingress Namespace, ServiceAccount, ConfigMap, ClusterRole, ClusterRoleBinding, Role, RoleBinding, Service, DaemonSet, Deployment, Pod, IngressClass, ValidatingWebhookConfiguration, Job Various, including rbac.authorization.k8s.io and admissionregistration.k8s.io get, list, create, update, patch, delete  
Log Monitoring Namespace, ConfigMap, Pod, Deployment, Service, Secret, PodDisruptionBudget, PersistentVolume, PersistentVolumeClaim, StatefulSet, ClusterRole, ClusterRoleBinding, DaemonSet, ServiceAccount, Ingress Various get, list, update, patch / create, update, patch, delete  
Infra Monitoring CustomResourceDefinition, ResourceQuota, ClusterRole, ClusterRoleBinding, Role, RoleBinding, ConfigMap, Deployment, Pods, HPA, PodDisruptionBudget, Service, StatefulSet, ServiceAccount, Alertmanager, Prometheus, ServiceMonitor, PrometheusRule, PodMonitor Various, including monitoring.coreos.com get, list, watch, create, update, patch, delete / deletecollection  
Vault Namespace, ConfigMap, Pod, Deployment, PersistentVolume, PersistentVolumeClaim, StatefulSet, Ingress, Secret, Service Various get, list / get, list, watch, create, update, patch, delete  
Istio CustomResourceDefinition, ClusterRole, ClusterRoleBinding, Role, RoleBinding, MutatingWebhookConfiguration, ValidatingWebhookConfiguration, EnvoyFilter, ConfigMap, Deployment, Pods, HPA, PodDisruptionBudget, Service, Node Various, including networking.istio.io and apiextensions.k8s.io get, list, watch, create, update, patch, delete / deletecollection Â