Task: Provision an Azure Kubernetes Service

Video: Create an Azure Kubernetes Service

Estimated time: 20 minutes for task

Goal

Provision an Azure kubernetes service and configure it to work with an Azure container registry.

Pre-requisites

  1. Azure subscription
  2. Azure container registry with a custom image

Requirements

  1. Provision an Azure Kubernetes service
  2. Configure the service to work with an Azure container registry

Requirement 1: Provision an Azure Kubernetes service

In this requirement you will provision an Azure Kubernetes service. Prior to provisioning the service you will create a service principal that will be used by the service.

Note: The easiest way to create a service principal is the az ad sp create-for-rbac CLI command. This can be run from the Azure cloud shell if you do not have the CLI installed.

Setting Value
Resource group Create new -> task-kubernetes
Cluster name kubernetes
Version 1.13.10
DNS name prefix <a unique prefix>
Node count 1
Service principal Use existing
SP client ID <SP appID>
SP client secret <SP password>
Enable RBAC Yes
Log analytics Create new->kubernetesspace

Take the defaults for all other settings

Requirement 2: Configure AKS to work with ACR

For this requirement you will grant the service principal used by the Kubernetes service provisioned in requirement 1 the right to pull images from you Azure container registry. To complete this requirement:

Clean up

Note: Other tasks use the Kubernetes service. If you plan on completing them you do not want to delete the *task-kubernetes** resource group, likewise you may not want to delete the registry yet.*

Solution

Having trouble completing this task? View the demonstration video to see how to do it.