# Agent RBAC Permissions

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](https://docs.perfectscale.io/getting-started/how-to-onboard-a-cluster#onboarding-instructions):

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

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