Azure role · containers
Azure Kubernetes Service Contributor RoleAzure built-in role
Grants access to read and write Azure Kubernetes Service clusters
Read onlyChange some thingsChange anythingGive access to others
Medium risk. It can create, change or delete some resources in scope.
In short: Azure Kubernetes Service Contributor Role is an Azure built-in role with 9 actions.
| 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>"What each line does
- Line 1: Creates a role assignment in Azure. Makes a change.
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
Find the smallest role for a task →
Link to this page
Writing a guide or answering a question? Copy this link.
<a href="https://azureblog.co.uk/roles/azure/azure-kubernetes-service-contributor-role/">Azure Kubernetes Service Contributor Role Azure role explained</a>Spotted something out of date or wrong? Tell us and we'll fix it.