Creating a Custom Kubernetes Role
Facets allows you to create custom Kubernetes roles, enabling you to define specific permissions tailored to your project's needs. This guide provides concise steps for setting up and assigning these roles, ensuring users have appropriate access to Kubernetes resources.
How to create a Custom Kubernetes Role?
- Open the Projects tab and select the desired project.
- In the Blueprint tab, search for and click on the k8s_access_control resource.
- Select Configurations from the dropdown.
- In the Configurations tab, select the JSON tab and edit the resource JSON.
- Under
"spec"
create the required roles. - Refer to the Add k8s roles and cluster roles runbook for detailed instructions on how to configure the resource.
- Click Save Changes.
You have successfully created the Kubernetes Roles in Facets.
How to assign Custom Kubernetes Roles to Users?
- Open the Settings tab and select User Management.
- Select the Roles tab and click on the Create Custom Role button.
- Add basic information for this custom role, such as Name (mandatory) and Description.
- In the Kubernetes Permissions dropdown, select Custom.
- Now, mention the Role and/or Cluster Role you created in this section.
- You can also select other specific permissions you want to assign to this custom role.
- Click on the Add Role button.
You have successfully created a Custom Role.
FAQs
1. Can I assign multiple Kubernetes roles to a single user?
No, you can only assign one role and one cluster role to a single user by mentioning Role and Cluster Role.
2. How do I assign specific permissions to a custom Kubernetes role?
In the spec
sectionk8s_access_control
resource, specify the required permissions. Refer to the Add k8s roles and cluster roles runbook for detailed instructions on how to configure the resource.
Updated 4 months ago