Skip to content

Commit e0fb521

Browse files
authored
Document Kubernetes required permissions (#3202)
* Document Kubernetes required permissions * Clarify that ClusterRole is required
1 parent 59b646d commit e0fb521

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/docs/concepts/backends.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,31 @@ projects:
10471047

10481048
If on-demand provisioning is important, we recommend using [VM-based](#vm-based) backends as they already support auto-scaling. -->
10491049

1050+
??? info "Required permissions"
1051+
The following Kubernetes permissions are sufficient for `dstack` to work:
1052+
1053+
```yaml
1054+
apiVersion: rbac.authorization.k8s.io/v1
1055+
kind: ClusterRole
1056+
metadata:
1057+
name: dstack-backend
1058+
rules:
1059+
- apiGroups: [""]
1060+
resources: ["namespaces"]
1061+
verbs: ["get", "create"]
1062+
- apiGroups: [""]
1063+
resources: ["pods"]
1064+
verbs: ["get", "create", "delete"]
1065+
- apiGroups: [""]
1066+
resources: ["services"]
1067+
verbs: ["get", "create", "delete"]
1068+
- apiGroups: [""]
1069+
resources: ["nodes"]
1070+
verbs: ["list"]
1071+
```
1072+
1073+
Ensure you've created a ClusterRoleBinding to grant the role to the user or the service account you're using.
1074+
10501075
> To learn more, see the [Kubernetes](../guides/kubernetes.md) guide.
10511076

10521077
### RunPod

0 commit comments

Comments
 (0)