Beruflich Dokumente
Kultur Dokumente
Container Service
In this document, you will deploy a Kubernetes Cluster on Azure Container Services
using the Azure CLI. You will need an Azure Subscription to complete this. You will
also need to complete some additional pre-requisites prior to deploying the
Kubernetes cluster to ACS.
Complete Pre-requisites:
Theres three main areas that we will cover as pre-requisites, prior to deploying the
cluster
1. Create Service Principal for Kubernetes Cluster
A) Create an application associated with your Azure directory
B) Get application ID and authentication key
C) Add Application to your subscription
2. Install Azure CLI 2.0
3. Create Public Private Key pair
The steps in this section are performed directly in the Azure portal.It is possible to
achieve the same result using a variety of methods, such as:
Azure CLI
Windows Powershell
Directly in deployment template
NOTE: The Service Principal ID and application ID items can also be created as part of
the Azure CLI 2.0 command used to create a Kubernetes cluster.
The Azure CLI is a command-line tool providing a great experience for managing
Azure resources. The CLI is designed to make scripting easy, query data, support
long-running operations, and more. Try it today and find out what the CLI has to
offer!
If you are running a distribution that comes with apt, such as Ubuntu or Debian,
there's a 64-bit package available for the Azure CLI. This package has been tested
with:
Install
1. Modify your sources list:
AZ_REPO=$(lsb_release -cs)
You can then run the Azure CLI with the az command. To sign in, az login command.
4. Then run the command az - - version to see what version you are running
(versions are broken out per module area i.e. acs for Azure Container service,
etc).
5. Run az group list, a list of your Azure resource groups should be returned.
As with other Kubernetes cluster creation options, you can specify parameters
for an existing service principal when you run az acs create. However, when
you omit these parameters, the Azure CLI creates one automatically for use
with Container Service. This takes place transparently during the deployment.
The following command creates a Kubernetes cluster and generates both SSH
keys and service principal credentials:
You can create a Kubernetes cluster on Container Service through the Azure portal
or with Azure CLI (command-line interface).
When the command completes, run the config current-context command to see if
the current context of kubectl is pointing to the Azure cluster:
After you confirm that the current context is pointing to the Azure cluster, run the
get nodes command to get more details about the nodes. These nodes correspond
to virtual machines on Azure.
To identify the various endpoints of the Kubernetes cluster on Azure, run the
cluster-info command