> 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/security/agent-rbac-permissions.md).

# Agent RBAC Permissions

Explore permissions PerfectScale Agent requires to provide the service

In order to provide the insights, and take the automated actions, to keep your K8s environment optimized, our agent requires the below permissions.

```
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: perfectscale-exporter
rules:
  - apiGroups:
      - ""
    resources:
      - pods
      - nodes
      - nodes/proxy
      - replicationcontrollers
      - persistentvolumeclaims
      - persistentvolumes
      - services
      - namespaces
      - events
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - ""
    resources:
      - namespaces
    verbs:
      - get
  - apiGroups:
      - "apps"
    resources:
      - deployments
      - replicasets
      - daemonsets
      - statefulsets
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - "storage.k8s.io"
    resources:
      - storageclasses
      - csinodes
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - "batch"
    resources:
      - jobs
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - "autoscaling"
    resources:
      - horizontalpodautoscalers
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - "coordination.k8s.io"
    resources:
      - leases
    verbs:
      - create
      - get
      - list
      - watch
      - update
  - apiGroups:
      - "metrics.k8s.io"
    resources:
      - pods
    verbs:
      - get
      - list
  - nonResourceURLs:
      - "/version"
    verbs:
      - "get"
```

{% hint style="info" %}
If you prefer not to expose node/proxy permissions, you can include the following configuration when [installing the exporter](/getting-started/how-to-onboard-a-cluster.md#onboarding-instructions):

```
--set settings.cAdvisorScrapingMode=direct
```

&#x20;Learn more about scraping modes [here](/getting-started/how-to-onboard-a-cluster.md#setting-cadvisor-scraping-mode).
{% endhint %}
