Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assigning Roles to Kuberentes Cluster #3

Open
houliang428 opened this issue Jul 15, 2019 · 0 comments
Open

Assigning Roles to Kuberentes Cluster #3

houliang428 opened this issue Jul 15, 2019 · 0 comments

Comments

@houliang428
Copy link

Hi. I created a Kubernetes Cluster and I want to assign the role "AcrPull" to it.
I tried similar codes with yours but encountered some problems.

IRoleAssignment roleAssignment2 = authenticated.RoleAssignments
                    .Define("Roles")
                    .ForObjectId(theCluster.Id)
                    .WithBuiltInRole(BuiltInRole.Contributor)
                    .WithScope(azureRegistry.Id)
                    .Create();
  1. There's no role named AcrPull in the field of BuiltInRole. But I found this role is listed in the official document of RBAC BuiltInRole.

  2. I tried with role contributor, but got
    The client 'xx' with object id 'yy' does not have authorization to perform action 'Microsoft.Authorization/roleAssignments/write' over scope '/subscriptions/d6622a0d-933b-4924-b2ff-ea141456872b/resourceGroups/myGroup/providers/Microsoft.ContainerRegistry/registries/MyRegistires/providers/Microsoft.Authorization/roleAssignments/Roles'.

Could you help me with the problems? Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant