Create a Kubernetes role grant¶
Kubernetes provides two types of role grants:
ClusterRoleBinding(applies to all namespaces)
RoleBinding(applies to a specific namespace)
To create a grant for a Kubernetes role in the MKE web UI:
Log in to the the MKE web UI.
In the navigation menu at the left, click Access Control to display the available options.
Click the Grants option.
At the top of the details paine, click the Kubernetes tab. All existing grants to Kubernetes roles are present in the details pane.
Click Create Role Binding to open the Create Role Binding page.
Select the subject type at the top of the 1. Subject section (Users, Organizations, or Service Account).
Create a role binding for the selected subject type:
Users: Select a type from the User drop-down list.
Organizations: Select a type from the Organization drop-down list. Optionally, you can also select a team using the Team(optional) drop-down list, if any have been established.
Service Account: Select a NAMESPACE from the Namespace drop-down list, then a type from the Service Account drop-down list.
Click Next to activate the 2. Resource Set section.
Select a resource set for the subject.
By default, the default namespace is indicated. To use a different namespace, select the Select Namespace button associated with the desired namespace.
ClusterRoleBinding, slide the Apply Role Binding to all namespace (Cluster Role Binding) selector to the right.
Click Next to activate the 3. Role section.
Select the role type.
Cluster Role type is the only role type available if you enabled Apply Role Binding to all namespace (Cluster Role Binding) in the 2. Resource Set section.
Select the role from the from the drop-down list.
Click Create to complete grant creation.