Updated 10. Setting the solution up in AKS (Azure Kubernetes Service) (markdown)

Cesar De la Torre 2018-05-17 12:52:06 -07:00
parent 65805916a4
commit ba77b70bba

@ -9,13 +9,14 @@ However, this post focuses specifically on AKS (Azure Kubernetes Service) deploy
# Prerequisites # Prerequisites
### A Docker development environment with `docker` and `docker-compose`. ### A Docker development environment with `docker` and `docker-compose`.
* Visit [docker.com](https://docker.com) to download the tools and set up the environment. Docker's [installation guide](https://docs.docker.com/engine/getstarted/step_one/#step-3-verify-your-installation) covers verifying your Docker installation.
Visit [docker.com](https://docker.com) to download the tools and set up the environment. Docker's [installation guide](https://docs.docker.com/engine/getstarted/step_one/#step-3-verify-your-installation) covers verifying your Docker installation.
### Azure cli 2.0 or later ### Azure cli 2.0 or later
Azure cli 2.0 or later must be installed in your dev machine [installation guide](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli). Azure cli 2.0 or later must be installed in your dev machine [installation guide](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli).
### The Kubernetes command line client, `kubectl`. ### The Kubernetes command line client, `kubectl`.
* This can be installed with the `az` tool as described in the Azure Container Service [walkthrough](https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough). `az` is also helpful for getting the credentials `kubectl` needs to access your cluster. For other installation options, and information about configuring `kubectl` yourself, see the [Kubernetes documentation](https://kubernetes.io/docs/tasks/kubectl/install/). `kubectl` can be installed with the `az` tool as described in the Azure Container Service [walkthrough](https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough). `az` is also helpful for getting the credentials `kubectl` needs to access your cluster. For other installation options, and information about configuring `kubectl` yourself, see the [Kubernetes documentation](https://kubernetes.io/docs/tasks/kubectl/install/).
### A Kubernetes cluster in AKS. ### A Kubernetes cluster in AKS.
You can follow any of the following approaches in order to create a Kubernetes cluster in AKS: You can follow any of the following approaches in order to create a Kubernetes cluster in AKS:
@ -37,15 +38,17 @@ You can follow any of the following approaches:
### Simple/quick ready-to-go script to create all the infrastructure in Azure ### Simple/quick ready-to-go script to create all the infrastructure in Azure
Create ALL the Azure infrastructure with an eShopOnContainer's ready-to-go script. Create ALL the Azure infrastructure with an eShopOnContainer's ready-to-go script.
Optionally, previous steps related to Azure infrastructure can be skipped if you run the **gen-k8s-env-aks.ps1** script to automatically create the Azure environment needed for the Kubernetes deployment. That includes the AKS cluster and optionally the ARC container registry. Optionally, previous steps related to Azure infrastructure can be skipped if you run the **gen-k8s-env-aks.ps1** script to automatically create the Azure environment needed for the Kubernetes deployment. That includes the AKS cluster and optionally the ARC container registry.
For example just by running the following cli script it would create to create the AKS cluster. For example just by running the following cli script it would create to create the AKS cluster.
**Important**: Note the parameter "-createAcr true". If you are creating the K8s cluster but you want to re-use and existing ACR, say "-createAcr false".
>``` >```
>./gen-k8s-env-aks -resourceGroupName k8sGroup -location westeurope -registryName k8sregistry -dnsName k8s-dns -serviceName k8s-cluster -createAcr true -nodeCount 3 -nodeVMSize Standard_D2_v2 >./gen-k8s-env-aks -resourceGroupName k8sGroup -location westeurope -registryName k8sregistry -dnsName k8s-dns -serviceName k8s-cluster -createAcr true -nodeCount 3 -nodeVMSize Standard_D2_v2
>``` >```
**Important**: Note the parameter "-createAcr true". If you are creating the K8s cluster but you want to re-use and existing ACR, say "-createAcr false".