> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Kubernetes metrics

[AppSignal for Kubernetes](https://github.com/appsignal/appsignal-kubernetes) extracts metrics from Kubernetes clusters.

After adding the AppSignal for Kubernetes deployment to your cluster, a Cluster Metrics section appears for your AppSignal application, displaying metrics for each node and each pod, as well as an overview of your cluster.

## Installation

To start reporting Kubernetes cluster metrics to AppSignal:

1. [Store your AppSignal API key in a secret](#store-your-appsignal-api-key-in-a-secret)
2. [Deploy to your cluster](#deploy-to-your-cluster)

### Store your AppSignal API key in a secret

Create a secret in your Kubernetes cluster containing your AppSignal app-specific push API key:

<CodeGroup>
  ```bash Bash theme={null}
  kubectl create secret generic appsignal -n appsignal --from-literal=api-key=<APPSIGNAL_API_KEY>
  ```
</CodeGroup>

You can find your *app-specific* push API key in [your application's settings](https://appsignal.com/redirect-to/app?to=info).

### Deploy to your cluster

Once you've created the AppSignal API key secret, add the AppSignal for Kubernetes deployment to your cluster:

<CodeGroup>
  ```bash Bash theme={null}
  kubectl apply -f https://raw.githubusercontent.com/appsignal/appsignal-kubernetes/main/deployment.yaml
  ```
</CodeGroup>

This will create the `appsignal` namespace and deploy AppSignal for Kubernetes in that namespace.

Alternatively, install AppSignal for Kubernetes through its Helm chart:

```bash Bash theme={null}
helm repo add appsignal-kubernetes https://appsignal.github.io/appsignal-kubernetes
helm install appsignal-kubernetes appsignal-kubernetes/appsignal-kubernetes --create-namespace --namespace appsignal
```

Once configured, AppSignal for Kubernetes will start reporting metrics automatically.

## Cluster Metrics

In AppSignal, the Host Metrics page will now be replaced with a Cluster Metrics page to show information about pods and nodes in your cluster. You will be able to see graphs representing useful metrics over time, such as:

* **CPU Usage:** CPU usage stats per node or pod
* **Memory Usage:** memory usage statistics, comparing the used memory to what's available per node or pod
* **Swap Usage:** swap usage statistics, comparing the used swap to what's available per node or pod
* **Disk Usage:** disk usage statistics, comparing the used disk space to what's available per node
* **Network usage:** network usage, split by received and transmitted bytes, per node

## Support

If you are experiencing any difficulties configuring your application's Kubernetes metrics, [contact support](mailto:support@appsignal.com), and we'll help you get your metrics flowing.
