> 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/psc-autoscaler-rbac-permissions.md).

# psc-autoscaler RBAC Permissions

Explore permissions PerfectScale Automation Agent requires to provide the service

In order to take the automated actions, to keep your K8s environment optimized, our psc-autoscaler requires the below permissions.

{% @github-files/github-code-block url="<https://github.com/perfectscale-io/perfectscale-io.github.io/blob/1ca3efba0f276af0814af3cb23e20217904f127b/charts/psc-autoscaler/templates/clusterrole.yaml>" visible="true" %}

`settings.allowNamespaceCreation` Helm value is enabled by default. When enabled, this permission allows the autoscaler to create target namespaces required for cross-namespace ephemeral workload automation. To opt out of automatic namespace creation, set `settings.allowNamespaceCreation=false` when [installing PerfectScale automation agent](https://docs.perfectscale.io/enable-automation/automation-setup-instructions.md#step-1-install-perfectscale-automation-agent).&#x20;

```bash
helm upgrade --install -n perfectscale psc-autoscaler \
      --set secret.create=false \
      --set settings.allowNamespaceCreation=false \
      perfectscale/psc-autoscaler
```

{% hint style="warning" %}
If `settings.allowNamespaceCreation` is disabled, cross-namespace ephemeral workload grouping will not work as expected for newly created ephemeral namespaces. You will need to manually create or configure each required namespace so automation can be applied.
{% endhint %}

[Bin packing automation](https://docs.perfectscale.io/enable-automation/bin-packing-automation.md) uses these permissions to drain nodes: patching nodes (cordon), deleting Karpenter `NodeClaims`, listing PodDisruptionBudgets, PersistentVolumes, PersistentVolumeClaims and CSINodes, and reading the `cluster-autoscaler-status` ConfigMap in `kube-system`. Pod eviction (`pods/eviction`) is part of the base permissions.
