From the course: Kubernetes: Your First Project

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Configuring Azure access with a service principal

Configuring Azure access with a service principal - Kubernetes Tutorial

From the course: Kubernetes: Your First Project

Configuring Azure access with a service principal

- [Instructor] Now that we've seen how to authenticate with the interactive login method, let's learn how to authenticate with service principals. Before we do that, we'll need to create a service principal to log in with. So let's jump right in and do that. The easiest way to do this is actually with the Azure CLI. Since you'll need to be logged into Azure before you can create service principals, you'll need to do the interactive login method to log in first. My previous video describes how to do that. Once you're logged in, run az account show. This command shows us some important information. Namely, it shows us the ID of the subscription that we're logged into. We're going to need that in the next step. So let's copy it, clear our screen, and then create our service principal. We can do that with az ad sp create-for-rbac. Next, we'll provide two command line flags. - -role will set the role for our service principal. There are a number of roles available within Azure's IAM…

Contents