Skip to content

Latest commit

 

History

History

azure

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Deploy Kubernetes in Microsoft Azure

Prerequisites

Prerequisites for Kubernetes

Install the kubectl

Use the Kubernetes command-line tool, kubectl, to deploy and manage applications on Kubernetes. Using kubectl, you can inspect cluster resources; create, delete, and update components; and look at your new cluster and bring up example apps.

More information and systems in kubernetes.io / Install and Set Up kubectl

kubectl setup on Linux

curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
sudo install -m 755 -o root -g root kubectl /usr/local/bin
kubectl setup on Mac

Using Homebrew package manager.

brew install kubectl
kubectl setup on Windows
Install-Script -Name install-kubectl -Scope CurrentUser -Force
install-kubectl.ps1

Prerequisites for Azure

Install Azure CLI

It's strongly recommend that you use a package manager for the CLI. A package manager makes sure you always get the latest updates, and guarantees the stability of CLI components. Check and see if there is a package for your distribution before installing manually.

More information and systems at Install Azure CLI 2.0.

Azure CLI setup on Linux and Mac
curl -L https://aka.ms/InstallAzureCli | bash
Azure CLI setup on Windows

Download the Azure CLI Installer

Managed Kubernetes with Azure Kubernetes Service (AKS)

Create resource group

export AZ_AKS_NAME='bcncloud-aks'
export AZ_AKS_RG="${AZ_AKS_NAME}-rg"
az group create --name ${AZ_AKS_RG} --location australiaeast

Create AKS Cluster

az aks create \
    --resource-group ${AZ_AKS_RG} \
    --name ${AZ_AKS_NAME} \
    --node-count 3 \
    --node-vm-size Standard_B2s \
    --generate-ssh-keys

Configure AKS Kubectl context

az aks get-credentials \
    --resource-group ${AZ_AKS_RG} \
    --name ${AZ_AKS_NAME}

Get information from the Kubernetes cluster

kubectl cluster-info
kubectl get cs

Clean up

To remove the resources deployed, remove the resource group.

az group  delete --resource-group ${AZ_AKS_RG}