Choosing the right Kubernetes object for deploying workloads in Azure
Authored by Mahesh Kshirsagar (AzureCAT). Reviewed by Brendon Burns (Distinguished Engineer, R&D Compute Dev), Wasim Bloch (AzureCAT), and Kimmo Forss (AzureCAT). Edited by Ed Price (AzureCAT patterns & practices).
This material has been added to a full eBook, Kubernetes Objects on Microsoft Azure.
Interest in Kubernetes as a container orchestrator is growing rapidly. The capabilities it offers are very exhaustive. As more and more enterprises adopt a containers/microservices-based architecture, a container orchestrator has become necessary in order to provide wide-ranging options to manage containerized workloads. While Docker has provided an excellent ecosystem to get started with containers, Kubernetes has really pushed the boundaries of this ecosystem. It provides many options to manage containerized workloads. However, these many options can also overwhelm beginners easily. This blog series is an attempt to demystify Kubernetes by focusing on a real-life scenario of deploying a basic multitiered application using pods and controllers. Along the path, I will include some of the decision criteria for Kubernetes. This includes helping determine the right Kubernetes objects for running workloads in Azure. I will illustrate various deployment options by deploying a 2-tier workload on Kubernetes. The concepts can be easily extended to multitier architecture implementations. The workload discussed in this blog series consists of a front-end web application running ASP.Net Core 1.0 (with little bit of SignalR). The backend consists of a SQL Server container running on Linux. The blog series includes the following posts:
- Part 1: This post covers setting up Kubernetes locally. It talks about minikube, kubectl, and so on.
- Part 2: This post covers setting up a Kubernetes cluster in Azure using Azure Container Service (ACS). It covers deployment options in Azure, deployment process, and connecting to a cluster by using a proxy.
- Part 3: This post is a high-level conceptual overview of Kubernetes. It covers various menu options in the Kubernetes dashboard.
- Part 4: This post covers deploying the SQL Server back-end, including choosing the right deployment object for running a database, the actual deployment process, and the interaction with SQL Server from SQL Server Management Studio.
- Part 5: This post covers deploying the ASP.Net Core web front-end, choosing the right deployment object, the actual deployment process, monitoring the cluster, and verification of the application working with the back-end.
The source code used is available at the following GitHub locations:
- ASP.Net Core Application: https://github.com/Mahesh-MSFT/KubernetesDemoApp
- SQL Server back-end creation script: https://github.com/Mahesh-MSFT/KubernetesDemoApp/tree/master/sqlscript
- Kubernetes SQL Server StatefulSet Creation Manifest: https://github.com/Mahesh-MSFT/KubernetesDemoApp/blob/master/k8smanifests/sqlserver-backend.yaml
- Kubernetes ASP.Net Core HorizontalPodAutoScaler Manifest: https://github.com/Mahesh-MSFT/KubernetesDemoApp/blob/master/k8smanifests/aspnetcore-frontend.yaml