Creating an AKS

In this section, we are going to create an AKS from the Azure portal. We will also deploy a multi-container application that includes a web frontend and a Redis instance in the cluster. To do so, follow these steps:

  1. Navigate to the Azure portal by opening https://portal.azure.com.
  2. Select Create a resource | Containers | Kubernetes Service.
  3. On the Basics page, add the following values:
    • Subscription: Select a subscription.
    • Resource group: Create a new one and call it PacktAKSResourceGroup.
    • Kubernetes cluster name: PacktAKSCluster.
    • Region(US) East US.
    • Kubernetes version: Leave it as the default.
    • DNS prefix namePacktAKSCluster-dns.
    • Node size: Leave it as the default:

Basic settings
  1. Then, select Authentication from the top menu. Here, we need to create a new service principal. Create a new one by leaving the default settings as they are, that is, the ones for (new) default service principal. You can also choose Configure service principal to use an existing one. If you use an existing one, you will need to provide the SPN client ID and secret. 
  2. Leave Enable RBAC under Kubernetes authentication and authorization enabled. This will provide you with more fine-grained control of the Kubernetes resources that are deployed in your AKS cluster:

Authentication settings
  1. By default, Basic networking is used and Azure Monitor for containers is enabled. Click Review + create and then Create.
  2. The AKS cluster will now be created. It will take some time before the creation process finishes.
Creating new AAD service principals may take a few minutes. When you receive an error regarding the creation of the service principal during deployment, this means the service principal hasn't been fully propagated yet. For more information, refer to the following website: https://docs.microsoft.com/en-us/azure/aks/troubleshooting#im-receiving-errors-that-my-service-principal-was-not-found-when-i-try-to-create-a-new-cluster-without-passing-in-an-existing-one.

Now that we have created the AKS cluster, we are going to connect to the cluster using kubectl.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset