Manage Roles
TOC
View Platform Roles (Read-Only)Grant a Platform Role to Users via ConsoleGrant a Platform Role to Users via YAMLView and Update a Kubernetes Role via YAMLDelete a Kubernetes RoleManage RoleBindingsFrom the Role PerspectiveFrom Users or User GroupsBest PracticesView Platform Roles (Read-Only)
Platform roles remain the canonical templates for core functionality.
- In the left navigation bar, click Users > Platform Roles.
- Use the list filters to locate a role. The Role Type column now shows
Platform,Project,Namespace, orCluster. - Click the role name to open the detail page.
- Switch to the YAML tab to inspect the exact definition. Use Download YAML if you need to archive the spec.
Grant a Platform Role to Users via Console
- In the left navigation bar, click Users > Platform Roles.
- Click the role name to open the detail page.
- Switch to the Members tab.
- Click Import Members.
- You can select users from the platform and import them to the role as members.
Grant a Platform Role to Users via YAML
You can submit the following YAML in the global cluster to grant a specific platform role to a user.
apiVersion: auth.alauda.io/v1 kind: UserBinding metadata: annotations: auth.cpaas.io/role.display-name: Platform Admin # Display name of the role to be assigned auth.cpaas.io/user.email: bxliu@alauda.io # Username of the user to grant the role to labels: auth.cpaas.io/role.display-name: "" # Display name of the role to be assigned auth.cpaas.io/role.level: platform # Scope of the role: platform, project, namespace, or cluster auth.cpaas.io/role.name: acp-platform-admin # Name of the role to be assigned auth.cpaas.io/user.email: 569526aac97a17ce8c1c185d7544aae4 # MD5 hash of the Username cpaas.io/cluster: "" # Name of the cluster; required when role level is namespace or cluster, leave empty for platform or project cpaas.io/namespace: "" # Name of the namespace; required when role level is namespace, leave empty for platform, project, or cluster cpaas.io/project: "" # Name of the project; required when role level is project or namespace, leave empty for platform or cluster name: dc30204c17c7fe8b15383f4ed7798c88 # Name of the UserBinding resource; can be customized
View and Update a Kubernetes Role via YAML
- Navigate to Users > Platform Roles > Kubernetes Roles.
- Search by name or label.
- Click the role name, then open the YAML tab.
- Click Edit, modify the manifest (labels, annotations, or
rules), and click Save. - Review the RoleBindings tab to ensure existing bindings still meet your expectations.
Delete a Kubernetes Role
- On the Kubernetes Roles list, click the overflow menu (…) next to the role.
- Select Delete Role.
- Confirm the role name to proceed.
Deleting a role removes it from the cluster. You must also clean up any RoleBindings that referenced the role. The UI will show a warning if bindings are still present.
Manage RoleBindings
From the Role Perspective
- Open a role (Role or ClusterRole) from the Kubernetes Roles tab.
- Go to the RoleBindings tab.
- Use the search bar (supports name and label filters) to locate existing bindings.
- Actions:
- Create RoleBindings: Launches the creation wizard.
- Update Role: Opens the YAML editor for the role itself.
- Delete Binding: Removes the RoleBinding/ClusterRoleBinding after confirmation.
From Users or User Groups
- Open Users (or User Groups) and select the desired entry.
- Switch to the Kubernetes Roles tab.
- Review all RoleBindings associated with the user/group across clusters.
- Click Add RoleBinding, choose:
- Cluster
- Binding type (RoleBinding/ClusterRoleBinding)
- Role/ClusterRole
- Namespace (for RoleBinding)
- Subject details
- Save the binding.
This workflow complements the existing Platform Roles tab, which is still used to attach system roles to users.
Best Practices
- Use staging clusters to validate YAML changes before applying them to production.
- Keep role definitions under version control (for example, export them into Git) so that changes remain auditable.
- When in doubt about required permissions, start from a system role`s YAML, copy it locally, and adapt it as a Kubernetes role through the new UI.