AKS

Because modern applications are now using containers, I’ll present to you today a PaaS service, for containers, with Azure Kubernetes Services. As you understand with the name, the orchestrator used is based on Kubernetes, a Google technology.

The advantage of AKS is that you just manage your environment, without taking care of the OS.

You can deploy AKS on Availability Zone now (announced during Ignite 2019).

To start, search in the Azure Market place for AKS and click on Create:

Azure Market place for AKS

Choose where to deploy resources, a name for your cluster, the region, the Kubernetes version and the DN name. Choose how many nodes you want and the size of each nodes. The master is managed by Microsoft:

Create cubernets cluster

Choose to which Virtual Network you want to connect your AKS environment:

Choose Virtual Network

As you can see, the AKS Object and the VNet has been deployed in the resource group that you provided and another RG has been created with name MC_RGName_ClusterName_Region. This RG will contains the public IP, the NSG, the Load Balancer and finally, the VMSS:

AKS Object

I’ve my 3 nodes in my VMSS:

3 nodes

Go now on https://shell.azure.com/ and connect to your shell. To connect to your AKS cluster, adapt the following command:

credentials

To verify that your nodes are present, use the following commands:

 kubectl get nodes

To see the admin interface of your AKS cluster, use the following command:

It will open to you a new tab, to browse your Kubernetes admin console. If you have warning, execute the following command:

Kubernetes admin console

Kubernetes admin console

Now, we will deploy a first application, a wordpress website, from the admin interface. Click on Create on the top of right and paste the following code, to create the secret for the DB:

Secrets

Now, we will create our MySQL container:

Kubernets overwiev

And now, the wordpress application:

Kubernets overwiev

As you can see in Azure, 2 new disks for data have been deployed, and a public IP for my wordpress:

2 new disks for data have been deployed

And in the load balancer, I’ve a new rule, to redirect the incoming traffic from port 80 to 80:

Load balancer

On Kubernetes, if you go on your Services you will see the public IP to browse the website:

Services

If you browse it, you will see your wordpress installation:

Wordpress installation

Wordpress installation

Currently, only one pod of this wordpress is running. To increase it, in Replicas Sets, click on Scale:

Replicas Sets

Replicas Sets details

And now, an application to vote, provided by Microsoft, directly from the console. I’ll create a file, and put the following code in it:

Azhure cloud shell

To deploy this, use the following command:

Kubectl apply

The application has been deployed correctly:

The application has been deployed correctly

VSAN from StarWind eliminates any need for physical shared storage just by mirroring internal flash and storage resources between hypervisor servers. Furthermore, the solution can be run on the off-the-shelf hardware. Such design allows VSAN from StarWind to not only achieve high performance and efficient hardware utilization but also reduce operational and capital expenses.

Learn more about ➡ VSAN from StarWind

Use the following command to get the public IP:

Kubectl get service azure

If you browse the IP, you will see the application:

Azure voting app

Don’t hesitate to use this AKS service to provide an HA and very easy manageable platform.

Views All Time
4
Views Today
13
Appreciate how useful this article was to you?
No Ratings Yet
Loading...
Back to blog
The following two tabs change content below.
Florent Appointaire
Florent Appointaire is Microsoft Engineer with 5 years of experience, specialized in Cloud Technologies (Public/Hybrid/Private). He is a freelance consultant in Belgium from the beginning of 2017. He is MVP Cloud and Datacentre Management. He is MCSE Private Cloud and Hyper-V certified. His favorite products are SCVMM, SCOM, Windows Azure pack/Azure Stack and Microsoft Azure.