← cd ~/roles
// roles/azure · containers
Azure Kubernetes Service Contributor RoleAzure built-in role
Grants access to read and write Azure Kubernetes Service clusters
| Role ID | ed7f3fbd-7b88-4dd4-9017-9adb7ce333f8 |
|---|---|
| Category | Containers |
| Actions | 9 |
| Data actions | 0 |
What it can do
| Permission | What it allows |
|---|---|
Microsoft.Authorization/*/read | Any read operation on anything under Microsoft.Authorization |
Microsoft.ContainerService/locations/* | Every operation under Microsoft.ContainerService/locations |
Microsoft.ContainerService/managedClusters/* | Every operation under Microsoft.ContainerService/managedClusters |
Microsoft.ContainerService/managedclustersnapshots/* | Every operation under Microsoft.ContainerService/managedclustersnapshots |
Microsoft.ContainerService/snapshots/* | Every operation under Microsoft.ContainerService/snapshots |
Microsoft.Insights/alertRules/* | Every operation under Microsoft.Insights/alertRules |
Microsoft.Resources/deployments/* | Every operation under Microsoft.Resources/deployments |
Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
Microsoft.ContainerService/deploymentSafeguards/* | Every operation under Microsoft.ContainerService/deploymentSafeguards |
Assign it
Scope it as tightly as you can: a resource or resource group rather than the whole subscription.
az role assignment create \
--assignee "jane.doe@contoso.com" \
--role "Azure Kubernetes Service Contributor Role" \
--scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
-RoleDefinitionName "Azure Kubernetes Service Contributor Role" `
-Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(resourceGroup().id, principalId, 'ed7f3fbd-7b88-4dd4-9017-9adb7ce333f8')
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ed7f3fbd-7b88-4dd4-9017-9adb7ce333f8')
principalId: principalId
}
}Who already has it?
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "ed7f3fbd-7b88-4dd4-9017-9adb7ce333f8"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)Other containers roles
- AcrDelete · 1 permission
- AcrPull · 1 permission
- Connected Cluster Managed Identity CheckAccess Reader · 1 permission
- Container Registry Cache Rule Reader · 1 permission
- Container Registry Credential Set Reader · 1 permission
- Container Registry Repository Catalog Lister · 1 permission
- AcrImageSigner · 2 permissions
- AcrPush · 2 permissions