Download - Create Azure Kubernetes Cluster
![Page 1: Create Azure Kubernetes Cluster](https://reader034.vdocuments.site/reader034/viewer/2022042710/6266cb4c710d714d69649ede/html5/thumbnails/1.jpg)
Create Azure Kubernetes Cluster
[Edition 01]
[Last Update 200629]
Atul Kumar
Oracle ACE & Cloud Expert
![Page 2: Create Azure Kubernetes Cluster](https://reader034.vdocuments.site/reader034/viewer/2022042710/6266cb4c710d714d69649ede/html5/thumbnails/2.jpg)
Contents
1 Introduction .........................................................................................................................................................3
2 Documentation Links ........................................................................................................................................4
3 Setting up Azure Kubernetes Cluster On Cloud .......................................................................................5 3.1.1 Setting Up Kubernetes cluster ......................................................................................................................................... 5 3.1.2 Create Kubernetes cluster and specify the details as below snapshot ........................................................... 5 3.1.3 Install Azure CLI to be able to interact with the Kubernetes cluster using your local machine ....... 12 3.1.4 To manage a Kubernetes cluster, we use kubectl, the Kubernetes command-line client ..................... 12
4 Summary............................................................................................................................................................. 14
![Page 3: Create Azure Kubernetes Cluster](https://reader034.vdocuments.site/reader034/viewer/2022042710/6266cb4c710d714d69649ede/html5/thumbnails/3.jpg)
1 INTRODUCTION
A Kubernetes cluster is a set of node machines for running containerized applications. If you're running Kubernetes, you're running a cluster. At a minimum, a cluster contains a control plane and one or more compute machines, or nodes.
This activity guide cover steps to
• Setting up Azure Kubernetes Cluster On Cloud
• How to Manage a Kubernetes Cluster using KUBECTL (Kubernetes CLI Client)
![Page 4: Create Azure Kubernetes Cluster](https://reader034.vdocuments.site/reader034/viewer/2022042710/6266cb4c710d714d69649ede/html5/thumbnails/4.jpg)
2 DOCUMENTATION LINKS
1. Kubernetes: https://azure.microsoft.com/en-in/overview/kubernetes-getting-started/
2. Azure Kubernetes Service (AKS): https://docs.microsoft.com/en-us/azure/aks/intro-kubernetes
![Page 5: Create Azure Kubernetes Cluster](https://reader034.vdocuments.site/reader034/viewer/2022042710/6266cb4c710d714d69649ede/html5/thumbnails/5.jpg)
3 SETTING UP AZURE KUBERNETES CLUSTER ON CLOUD
3.1.1 SETTING UP KUBERNETES CLUSTER
1. Login to Azure portal @ portal.azure.com and sign in using your account credentials.
2. On the search bar type in kubernetes and select “Kubernetes services”
3.1.2 CREATE KUBERNETES CLUSTER AND SPECIFY THE DETAILS AS BELOW SNAPSHOT
1. Specify name, region and Kubernetes version details
![Page 6: Create Azure Kubernetes Cluster](https://reader034.vdocuments.site/reader034/viewer/2022042710/6266cb4c710d714d69649ede/html5/thumbnails/6.jpg)
2. Specify agent pool details, select machine size as per your requirement
3. Specify Authentication method and enable RBAC
![Page 9: Create Azure Kubernetes Cluster](https://reader034.vdocuments.site/reader034/viewer/2022042710/6266cb4c710d714d69649ede/html5/thumbnails/9.jpg)
7. Validation is passed so now click on create to deploy the cluster
8. Cluster creation in progress
![Page 12: Create Azure Kubernetes Cluster](https://reader034.vdocuments.site/reader034/viewer/2022042710/6266cb4c710d714d69649ede/html5/thumbnails/12.jpg)
3.1.3 INSTALL AZURE CLI TO BE ABLE TO INTERACT WITH THE KUBERNETES CLUSTER USING YOUR LOCAL MACHINE
1. Azure CLI installation on windows
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest
2. Azure CLI installation on macOS
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-macos?view=azure-cli-latest
3.1.4 TO MANAGE A KUBERNETES CLUSTER, WE USE KUBECTL, THE KUBERNETES COMMAND-LINE CLIENT
1. To install kubectl locally, use the az aks install-cli command
$ az aks install-cli
2. Get a list of your subscriptions with the az account list command:
$ az account list
3. Use az account set with the subscription ID or name you want to switch to.
$ az account set –subscription “subscription ID or name”
![Page 13: Create Azure Kubernetes Cluster](https://reader034.vdocuments.site/reader034/viewer/2022042710/6266cb4c710d714d69649ede/html5/thumbnails/13.jpg)
4. To configure kubectl to connect to your Kubernetes cluster, use the az aks get-credentials command. This command downloads credentials and configures the Kubernetes CLI to use them.
$ az aks get-credentials --resource-group k8s-demo --name k8s-demo
5. To verify the connection to your cluster, use the kubectl get command to return a list of the cluster nodes.
$ kubectl get nodes
![Page 14: Create Azure Kubernetes Cluster](https://reader034.vdocuments.site/reader034/viewer/2022042710/6266cb4c710d714d69649ede/html5/thumbnails/14.jpg)
4 SUMMARY
This completes step by step guide covering:
• Setting up Azure Kubernetes Cluster On Cloud
• How to Manage a Kubernetes Cluster using KUBECTL (Kubernetes CLI Client)