Description
Deckhouse Platform provides a standard set of roles for managing access to project and cluster resources. There are two types of roles:
- Use roles: Assigned to project users, allowing them to manage resources within a specified project.
- Manage roles: Intended for Deckhouse Platform administrators, granting them permissions to manage resources at the platform-wide level.
Platform permissions are configured using the standard Kubernetes RBAC approach.
This involves creating RoleBinding or ClusterRoleBinding resources to assign the appropriate role.
Use roles
Use roles grant permissions to a user within a specified project and define access to project resources.
These roles can only be used with a RoleBinding resource.
Deckhouse Platform provides the following use roles:
d8:use:role:viewer: Allows viewing project resources and authenticate to the cluster.d8:use:role:user: Includes all permissions from thed8:use:role:viewerrole and also allows viewing RBAC secrets and resources, connect to virtual machines, and run thed8 k proxycommand.d8:use:role:manager: Includes all permissions from thed8:use:role:userrole and also allows managing project resources.d8:use:role:admin: Includes all permissions from thed8:use:role:managerrole and also allows managing the following resources:ResourceQuota,ServiceAccount,Role,RoleBinding,NetworkPolicy, andVirtualImage.
Example of administrator permissions granted to the joe user in the vms project:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: project-admin-joe
namespace: vms
subjects:
- kind: User
# For users.deckhouse.io, the parameter is .spec.email.
name: joe@example.com
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: d8:use:role:admin
apiGroup: rbac.authorization.k8s.ioExample of administrator permissions granted to the vms-admins user group in the vms project:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: project-admin-joe
namespace: vms
subjects:
- kind: Group
# For groups.deckhouse.io, the parameter is .spec.name.
name: vms-admins
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: d8:use:role:admin
apiGroup: rbac.authorization.k8s.ioManage roles
Manage roles grant permissions to manage the following:
- Deckhouse Platform cluster resources
- Deckhouse Platform module settings
- Module components in projects with the
d8-*andkube-*prefixes
Deckhouse Platform provides the following manage roles, allowing to manage all subsystems of the all cluster:
d8:manage:all:viewer: Grants permissions to view module configurations (moduleConfigresources) and access cluster-wide resources of these modules.d8:manage:all:manager: Includes all permissions from theviewerrole and also allows managing module configurations and cluster-wide resources of these modules.
Example of cluster administrator permissions granted to the jane user:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cluster-admin-jane
subjects:
- kind: User
# For users.deckhouse.io, the parameter is .spec.email.
name: jane.doe@example.com
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
# Manage role name.
name: d8:manage:all:admin
apiGroup: rbac.authorization.k8s.ioDeckhouse Platform can grant restricted permissions to administrators for managing resources and modules associated with specific subsystems.
To assign network subsystem administrator permissions to the jane user, use the following configuration:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: network-admin-jane
subjects:
- kind: User
# For users.deckhouse.io, the parameter is .spec.email.
name: jane.doe@example.com
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
# Manage role name.
name: d8:manage:networking:admin
apiGroup: rbac.authorization.k8s.ioSubsystem management role names follow the d8:manage:<SUBSYSTEM>:<ACCESS_LEVEL> format, where:
<SUBSYSTEM>indicates the subsystem name.<ACCESS_LEVEL>indicates the access level, similar to the roles for theallsubsystem.
The subsystems available for manage roles are listed in the following table:
{% include rbac/rbac-subsystems-list.liquid %}