> For the complete documentation index, see [llms.txt](https://docs.perfectscale.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perfectscale.io/administration/cluster-settings.md).

# Cluster settings

**Cluster Settings** contains a variety of configurable parameters, including:&#x20;

* [General cluster settings](#general-settings)
* Various [customizations](#customizations)
* [Cluster labels](#cluster-labels)
* Status of the [Agent](#agent) connecting the cluster to PerfectScale

To navigate to the **`Custer Settings`** , go to the  **`Overview`** tab and find the needed cluster from the list of onboarded clusters. Hover over the cluster and click on the **`Gear`** button.&#x20;

<figure><img src="/files/x4zpAYHtZbEBCJZvpvR4" alt=""><figcaption><p>Cluster settings</p></figcaption></figure>

## General settings

<figure><img src="/files/tDBeGBvBzDGW85qa1PqH" alt=""><figcaption><p>General cluster settings</p></figcaption></figure>

1. **Cluster Name** - (editable field) displays the name of the cluster.
2. **Optimization Policy** - specifies how resources should be allocated to achieve the desired level of resiliency. This allows setting policies to support the individual needs of your workloads. Keep the default or select one of the following values:

   * MaxSavings - maximum cost savings, the best for non-production environments
   * Balanced (default) - optimally balances cost and resiliency
   * ExtraHeadroom - the best fit for latency-sensitive environments&#x20;
   * MaxHeadroom - keeps the environment above the highest spikes

   Discover more about customizing the Optimization policy [here](/customize-workflow/optimization-policy-customization.md).
3. **Region** - (autodetected editable field) displays the region where the cluster is running.
4. **Cloud Provider** - (autodetected non-editable field) displays the cloud provider name.
5. **Initialization Date** - (non-editable field) displays the date when the cluster was added.
6. **Disconnect Cluster** - click on the button to disconnect the cluster from PerfectScale.
7. **Kubernetes version** - shows the Kubernetes version currently used by the cluster.

Click **`Save Changes`** button to save the changes or  **`Cancel & Close`** to discard them.

## Customizations

PerfectScale offers a range of customizable features designed to empower you in building your own optimized K8s ecosystem. These enhancements boost observability throughout your environment while streamlining processes like alerting, ticketing, and pricing management.

Explore the available customizations [here](/customize-workflow/customization-overview.md).

## Cluster labels

PerfectScale allows you to leverage your cluster labels, enabling you to organize and manage your Kubernetes clusters in the usual way. This capability is particularly helpful when managing large-scale Kubernetes environments with numerous clusters. By defining and applying cluster labels, you can streamline navigation and filtering across PerfectScale dashboards, ensuring quick access to the data you need.

<figure><img src="/files/5sAUwjeAKj63bIa2ZkOv" alt=""><figcaption><p>Cluster labels</p></figcaption></figure>

### Adding labels via the UI

There are two seamless approaches to add cluster labels:&#x20;

* [From the cluster settings](#add-cluster-labels-from-cluster-settings)
* [From the global settings](#add-cluster-labels-from-global-settings)

#### Add cluster labels from cluster settings

1. In the cluster list, click the **gear** icon next to the cluster name to open **Cluster Settings**.
2. Go to the **Labels** tab.
3. Click **+ New Label**.
4. Enter the **Label Key** and **Label Value**.

{% hint style="warning" %}
The label key must be unique per cluster. If you attempt to add a label using a key that already exists on that cluster, the label will not be applied.
{% endhint %}

{% hint style="info" %}
Both the Key and the Value are limited to a maximum of 225 characters. Only alphanumeric characters and the following special symbols are allowed: `. - _ /`.
{% endhint %}

5. Click **Save**.

<figure><img src="/files/B2kJFzOdCK4fjcBYKP9Y" alt=""><figcaption><p>Add cluster label - cluster settings</p></figcaption></figure>

#### Add cluster labels from global settings

1. Navigate to **Global Settings** in the bottom-left corner of the screen.
2. Open **Cluster Labels**.
3. Under the desired cluster, click **+ New Label**.
4. Enter the **Label Key** and **Label Value**.

{% hint style="warning" %}
The label key must be unique per cluster. If you attempt to add a label using a key that already exists on that cluster, the label will not be applied.
{% endhint %}

{% hint style="info" %}
Both the Key and the Value are limited to a maximum of 225 characters. Only alphanumeric characters and the following special symbols are allowed: `. - _ /`.
{% endhint %}

5. Click **Save**.

<figure><img src="/files/zCcmrQFZcPZbkixAV08d" alt=""><figcaption><p>Add cluster label - global settings</p></figcaption></figure>

### How to edit/delete a label in the UI

You can seamlessly edit or delete labels. Simply hover over the label in either the cluster settings or the global settings, and select the desired action.

<figure><img src="/files/FSXEUS8WEFofP6j0YG48" alt=""><figcaption><p>Label actions</p></figcaption></figure>

### Adding labels via CR

{% hint style="warning" %}
Labels defined in the CR take precedence over labels added via the UI. If both define the same key, the value from the CR will be used.

**Example**:

Label added via the UI: `env: prod`

Label defined in the CR: `env: app`

**Result:** `env: app` is applied (CR has higher priority).
{% endhint %}

To add labels, you need to define and apply a Custom Resource (CR) that specifies these labels (`key: value`). This approach allows you to manage labels directly through Kubernetes manifests.&#x20;

Here is an example of the CR configuration:

```yaml
apiVersion: perfectscale.io/v1
kind: ClusterSettings
metadata:
  name: cluster-settings
  namespace: perfectscale
spec:
  # Cluster classification labels
  clusterLabels:
    env: production
    team: platform
    cost-center: engineering
```

{% hint style="info" %}
Both the Key and the Value are limited to a maximum of 225 characters. Only alphanumeric characters and the following special symbols are allowed: `. - _ /`.
{% endhint %}

Labels defined in the CR are displayed in the UI with a dedicated `CRD` flag. Such labels cannot be edited in the UI and can only be updated in the CR.

<figure><img src="/files/ILzFjL2S9C4w3ytJB2Gw" alt=""><figcaption><p>Cluster label via CR</p></figcaption></figure>

## Automation

PerfectScale provides a quick, UI-based automation setup, so there’s no need to configure automation CRs. Learn more about Automation via UI [here](/enable-automation/configuring-automation-via-ui.md).

<figure><img src="/files/99SxPDNkRlUURGBg8AWA" alt=""><figcaption><p>Automation via UI</p></figcaption></figure>

## Agent&#x20;

PerfectScale delivers its services through agents like the **PSC Exporter**, **PSC AutoScaler,** etc. To continuously analyze your environment, provide recommendations, and execute automation on your clusters, it's essential to have the relevant agent installed.&#x20;

<figure><img src="/files/Foz2jDOEdAJO2Y2VgvwL" alt=""><figcaption><p>PerfectScale agents</p></figcaption></figure>

In **Cluster Settings** (accessed by clicking the gear icon next to the cluster name), select **Agents**. Here you can seamlessly check the current version of the agents, explore recent release notes, and manage the agents. Clicking the **Release Notes** button takes you to [GitHub](https://github.com/perfectscale-io/perfectscale-io.github.io/releases), where you can explore comprehensive release details, including changes and assets.

### Updating agents

In order to ensure you receive superior service and benefit from the latest features, it’s important to keep the agents up to date.&#x20;

You may encounter two types of update statuses:

* **Update Available** - a newer version is available, including new features and fixes, and can be installed at your convenience.
* **Update Required** - updating to a newer version is mandatory to continue receiving service (for example, if your current version is no longer supported).

PerfectScale provides you with several options on how to upgrade the Agents and keep operations smooth:

* [**Install PerfectScale Operator**](/administration/perfectscale-operator.md) (recommended)
* [Update the agents manually](/administration/cluster-settings.md#updating-agents-manually).

#### Updating agents with PerfectScale Operator

The PerfectScale Operator is a Kubernetes operator that handles the installation and upgrades of PerfectScale components, including the Exporter, Automation Agent, and others. It helps reduce maintenance, minimize manual work, and speed up feature rollouts across your clusters.

To learn more about installing and using the PerfectScale Operator, go [here](/administration/perfectscale-operator.md).

#### Updating agents manually

When updating agents manually, go to **Cluster Settings** (accessed by clicking the gear icon next to the cluster name), select **Agents**. Once there, click **Show Updates Instructions** next to the agent, where newer version is available.

<figure><img src="/files/N5hLsNdumWjTEfnaFpOY" alt=""><figcaption><p>Updating agent manually</p></figcaption></figure>

Proceed with the two steps:

1. Update the Helm repository

```
helm repo update perfectscale
```

2. Update the PerfectScale version (example for the exporter):

```
helm upgrade --install -n perfectscale \
--reset-then-reuse-values \
perfectscale perfectscale/exporter
```

Alternatively, you can install the PerfectScale Operator to automate deployment and ensure your agents stay up to date with the latest features and product updates. [Learn how to migrate](/administration/perfectscale-operator.md#migration-of-existing-cluster-to-operator).

### Managing agents

PerfectScale provides a comprehensive **Agent Management** view, allowing you to easily access agent-related information and manage or update your agents. There are two ways to access the Agent Management view:

1. From the Overview screen.
2. From the Account settings.

<figure><img src="/files/Q10Z3liI60ArzAm1hSlh" alt=""><figcaption><p>Manage agent</p></figcaption></figure>

From this view, you can:

* See information about available agent updates.
* Access detailed **Helm** or **CRD** instructions, depending on the selected update mode.
* Monitor the progress of ongoing updates or see a **Failed** status if an update encounters an issue.

By hovering over the displayed status or listed version you can view detailed information about the update or the reason for any failure.

<figure><img src="/files/Fm7u4CoYLVOwbNyjsL5m" alt=""><figcaption><p>Update failed flag</p></figcaption></figure>

If the Agent Operator is installed to the cluster(s) and the mode is set to [webapp](/administration/perfectscale-operator.md#webapp), you can trigger updates for all agents with a single click for these cluster(s).

<figure><img src="/files/BnL9zwD0wtmhDIj6MsZ6" alt=""><figcaption><p>Upgrade all agents</p></figcaption></figure>

#### Agent version history

When updating agents manually by explicitly setting the agent version in the CRD, you can review the CRD history to track previous versions, see changes made over time, and verify update actions for auditing or troubleshooting purposes. To access it, click the **CRD** label next to the agent version, then select **Show History**.

<figure><img src="/files/54TYLueLkADVm4ksBowO" alt=""><figcaption><p>Agent version history</p></figcaption></figure>

## Specifying an optimization policy or returning to the default

{% hint style="info" %}
If you set an optimization policy or custom time window using `helm upgrade`, you won’t be able to change these settings in the UI until you revert them to the defaults.
{% endhint %}

When upgrading the Agent, you can seamlessly specify an optimization policy and set a [custom time window](/customize-workflow/optimization-policy-customization.md).

To specify an optimization policy and/or a custom time window when installing the Agent, use the following command:

```yaml
helm upgrade --install -n some-release-name --create-namespace some-namespace \
  --set secret.create=true \
  --set secret.clientId=CLIENT_ID \
  --set secret.clientSecret=CLIENT_SECRET \
  --set settings.clusterName=CLUSTER_NAME \
  --set settings.clusterOptimizationPolicy="MaxSavings" \ # specify a desired optimization policy
  --set settings.optimizationPolicyTimeWindow="21d" \ # set a desired custom time window
  perfectscale/exporter
```

To revert to the default optimization policy and time window, upgrade the Agent using the following command:

```yaml
helm upgrade --install -n some-release-name --create-namespace some-namespace \
  --set secret.create=true \
  --set secret.clientId=CLIENT_ID \
  --set secret.clientSecret=CLIENT_SECRET \
  --set settings.clusterName=CLUSTER_NAME \
  perfectscale/exporter
```

{% hint style="info" %}
To revert to the default optimization policy and time window, do not specify `clusterOptimizationPolicy` and `optimizationPolicyTimeWindow`.
{% endhint %}

## Delete a cluster

{% hint style="info" %}
The endpoint removes the cluster instance from PerfectScale.
{% endhint %}

There may be situations where you need to remove a cluster from PerfectScale. You can seamlessly delete a cluster using the Public API. Learn more [here](/api/public-api.md#deleting-a-cluster).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.perfectscale.io/administration/cluster-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
