Cluster view
See live Kubernetes resources, cluster health, and deployment history for a cluster directly in Harness
Harness lets you deploy to Kubernetes clusters, and cluster view shows you what is actually running in them. Without cluster view, checking resource health or troubleshooting a cluster requires leaving Harness for an external tool such as Lens or K9s. When you enable cluster discovery on an infrastructure definition, Harness deploys a lightweight collector agent to your cluster and shows the resources it finds, their health, and the deployments that targeted them, directly on the environment and infrastructure definition pages.
Cluster view is supported on the following Kubernetes infrastructure types: Kubernetes (Direct), Google Kubernetes Engine (GKE), Amazon Elastic Kubernetes Service (EKS), and Azure Kubernetes Service (AKS). Other types, such as Rancher, are not supported.
What you will learn from this topic
How to enable cluster discovery on an infrastructure definition.
Understand what cluster view shows on the environment and infrastructure definition K8s Resources tabs.
Understand which resource types cluster view discovers and displays.
Understand what the discovery statuses mean and when they appear.
Before you begin
Complete the following requirements before you enable cluster discovery:
A Kubernetes infrastructure definition: Cluster view is available on static Kubernetes infrastructure definitions. Go to Kubernetes infrastructure to create one if you do not already have one.
A fixed namespace: The infrastructure definition's namespace field must be a fixed value. Infrastructure definitions that use a runtime input or expression for the namespace are not supported.
A working Kubernetes connector: The collector agent connects to your cluster through the delegate associated with your Kubernetes connector. By default, Harness provisions the agent's service account and RBAC automatically; no separate setup is required. Go to Kubernetes cluster connector settings reference to review connector roles and policies, or go to Install the cluster discovery Helm chart if your cluster policy requires a pre-provisioned service account instead.
Environment permissions: View and Create/Edit on the environment and its infrastructure definitions. Go to the permissions reference to review the required permissions.
Enable cluster discovery
When you enable cluster discovery, Harness deploys a lightweight collector agent to your cluster, built on the same Kubernetes service discovery agent technology as a scoped-down version of the Harness Chaos Engineering agent.
Perform the following steps to enable cluster discovery:
Create or edit a Kubernetes infrastructure definition.
Scroll down to the Cluster Details section.
Select Enable Cluster Discovery.
Set the Service Account field based on your cluster policy:
Leave it empty if your Kubernetes connector has permission to create a service account. Harness provisions one automatically and uses it to deploy the collector agent.
Enter a service account name if your cluster policy does not allow Harness to create a service account. Go to Install the cluster discovery Helm chart to create a scoped-down service account yourself, using the Helm chart Harness publishes at github.com/harness/helm-cd-cluster-view, then enter that service account's name here. The Helm chart only creates the service account and its RBAC; it does not install the collector agent. Harness still deploys and connects the agent itself, through the delegate associated with your Kubernetes connector.

What you see in cluster view
Environment-level view
On an environment's K8s Resources tab, Harness lists every Kubernetes cluster connected to that environment through its infrastructure definitions, along with:
The number of infrastructure definitions associated with the cluster.
The number of namespaces associated with the cluster.
The cluster's discovery status.

Infrastructure definition-level view
On an infrastructure definition's K8s Resources tab, Harness shows three sub-tabs, scoped to that infrastructure definition's cluster and namespace.
The Resources sub-tab shows a count card for each resource type cluster view discovers, for example Replica Sets 511 or Nodes 7. Select a card to filter the table below it to that resource type.

The table lists individual resources with the following columns:
Name
Namespace
Ready
Up-to-date
Available
Age
Health
Use Add filter to filter the table by Health or Namespace, or use the search box to find a resource by name.

Select a resource to view its details and the YAML manifest Harness discovered for it. Harness shows a Last synced timestamp above the table, next to a manual refresh control.
The Infra Definitions sub-tab lists the infrastructure definitions associated with this cluster, with the following columns:
Name
Infrastructure Type
Namespaces
Discovery Status
Harness deploys one collector agent per cluster. If you enable cluster discovery for a second infrastructure definition that points at a cluster Harness already discovers, Harness reuses the existing agent instead of deploying a new one.

The Deployments sub-tab lists the Harness pipeline executions that targeted this cluster, with the following columns:
Execution
Service
Status
Artifact
Trigger
Deployed time
Select an execution to go to its pipeline execution details.

Cluster view shows every resource it discovers in the target namespace; it does not filter resources by service. Namespace-scoped resources, such as deployments, pods, and replica sets, refresh continuously through Kubernetes informers and watches. Cluster-scoped resources, such as nodes and namespaces themselves, refresh on a five-minute interval.
Supported resource types
Cluster view syncs and displays the following resource types, in this order:
Deployments
Pods
StatefulSets
DaemonSets
Jobs
CronJobs
ReplicaSets
Replication Controllers
Services
Namespaces
Nodes
Harness uses the delegate's existing read-only (get, list, watch) access to these resource types. Harness never creates, modifies, or deletes resources in your cluster through discovery.
Discovery statuses
An infrastructure definition with cluster discovery enabled shows one of the following statuses:
In progress: Harness is syncing resources for the first time. Hover over the status for details; this may take a few minutes.
Active: Harness is syncing resources successfully.
Failed: The last sync attempt failed. Hover over the status to see the specific error.
Next steps
You can enable cluster discovery on an infrastructure definition and review the Kubernetes resources, health, and deployment history for its target cluster from the environment and infrastructure definition K8s Resources tabs.
Environments overview: Review how infrastructure definitions fit into an environment.
Last updated
Was this helpful?