November 1, 2020
Topics: Azure NetApp Files AzureElementary6 minute readKubernetes
What Is an Azure Kubernetes Cluster?
Kubernetes clusters are groups of resources that include one or more pods. Pods are groups of containers. In a pod, containers are dedicated to specific functions and can share data or communicate with other containers in the pod. The primary way to deploy Kubernetes clusters in the Microsoft Azure cloud is the Azure Kubernetes Service (AKS).
AKS is a managed service that you can use to configure and manage your clusters. The service takes care of maintenance tasks like health monitoring and updating and enables you to focus on operating your deployment. When deploying clusters with AKS, the service manages your Kubernetes masters while you manage your worker nodes.
We will also cover how Azure NetApp Files can help you optimize Azure file storage to achieve ultra-fast Kubernetes performance on Azure.
In this article, you will learn:
- Azure Kubernetes Cluster Architecture
- Best Practices for Cluster Isolation and Security in Kubernetes Azure Service
- Azure Kubernetes with NetApp
A Refresher: Key Components of Kubernetes Clusters
To better understand how AKS works, it helps to be familiar with the basics of Kubernetes clusters. Each cluster contains the following components:
- kube-apiserver—hosts a REST interface for Kubernetes resources that you can customize. It enables you to interact with Kubernetes components and utilities.
- kube-scheduler—enables you to automate resource provisioning according to defined policies. This utility determines where and when workloads run.
- kube-controller-manager—enables you to monitor your cluster state and ensures that resources match defined statuses. If cluster states don’t match, controllers are used to deploy resources’ needs to match the defined state.
- kubelet—a node agent that enables you to automatically check the status of nodes and communicate with clusters. This agent is used to orchestrate requests and run containers.
- kube-proxy—a network proxy that enables you to connect nodes within a cluster and allows communication between nodes. It manages your node and cluster IP addresses.
- etcd—a key-value store that contains your cluster configuration information.
Azure Kubernetes Cluster Architecture
When operating Kubernetes in AKS, all of the above elements exist. The difference is in the flexibility you have to set components up and how responsible you are for maintaining components. The most important aspects to understand in AKS are how your control plane is managed and how your nodes are managed.
In AKS, your control plane is automatically configured as a managed resource when you create a cluster. This resource is created in the same region as your cluster and does not incur a cost on its own. The control plane is a single tenant and includes dedicated components, including a scheduler and API server.
When you create your cluster, you define the size and number of nodes you want and AKS connects the control plane to those nodes. You do not need to define your etcd cluster, proxies, or controllers. However, you also cannot access these components directly. This means that tasks like upgrading your clusters must be performed through the Azure Portal or CLI.
Nodes and Node Pools
When deploying clusters to AKS, your nodes are based on Azure virtual machines (VMs). Each VM hosts your required node components and includes Moby as your container runtime. This component is what enables your applications to operate and interact with storage and networking components.
The size you specify for your nodes determines your resources, including available storage, memory, and CPU power. This means you can size your nodes to optimize costs and ensure performance. Additionally, nodes are billed like any other VM so you can apply price discounts automatically. Currently, the VM images available for AKS nodes are based on Windows Server 2019 or Ubuntu Linux.
Deploy an Azure Kubernetes Service Cluster
This walkthrough explains how to deploy an AKS cluster using the Azure CLI. This walkthrough is adapted from the Azure documentation and you can find additional information about these steps here.
Create your principal
To start, you need to create a service principal for Azure Active Directory. This component connects your Azure resources to your cluster. You can create this principal manually or rely on AKS to create one by default.
Below you can see an example of this principle with example names. To modify the configuration, you would change names as needed. Once your component is created, you can verify your configuration in the returned JSON file.
az aks create
Install and configure kubectl
After you create your cluster and connect it to your resources, you can access it directly using kubectl. This utility is the default CLI for Kubernetes and is pre-installed if you are using the Azure Cloud Shell. If you would prefer to use kubectl directly, you can install it with this command:
az aks install-cli
Once installed, you can configure kubectl with your AKS credentials. If you do not know your credentials, you can access them with the following command:
az aks get-credentials
After providing your credentials to kubectl, you should be able to connect to your cluster. You can confirm this connection with the command below:
$ kubectl get nodes
Provided your connection was successful, you should receive an output like the following:
NAME STATUS ROLES AGE VERSION
Aks-nodepool-test Ready agent 30m v1.14
Azure Kubernetes with Azure NetApp Files
Azure NetApp Files is a Microsoft Azure file storage service built on NetApp technology, giving you the file capabilities in Azure even your core business applications require.
Get enterprise-grade data management and storage in Azure to manage workloads, applications and development deployments with ease, and move all of your file-based environments to the cloud.
Azure NetApp Files solves availability and performance challenges for enterprises that want to move mission-critical applications to the cloud, including workloads like HPC, SAP, Linux, Oracle and SQL Server workloads, Windows Virtual Desktop, and more.
In particular, Azure NetApp Files gives you data management, such as cloning and backup capabilities that reduce your workspace deployment times allowing you to migrate more applications to Azure–even your business-critical workloads–with extreme file throughput with sub-millisecond response times.
Want to get started? See Azure NetApp Files for yourself with a free demo.
Learn More About Azure Kubernetes
Read more in our series of guides about Azure Kubernetes
Out-of-This-World Kubernetes Performance on Azure with Azure NetApp Files
Azure NetApp Files is a PaaS shared file service that you can use to boost the performance of your Kubernetes deployments on-premises or in Azure. This service is natively supported by Azure and can help you more effectively manage your Kubernetes deployments.
In this article you’ll learn how Azure NetApp Files can improve your Kubernetes performance and how to deploy a Kubernetes cluster in Azure Kubernetes Service.
Read more: Out-of-This-World Kubernetes Performance on Azure with Azure NetApp Files
Address Persistent Storage Woes in AKS Using Azure NetApp Files
Azure Kubernetes Service (AKS) is a service that you can use to easily manage container-based workloads in Azure. When deploying this service, you also need to deploy persistent storage to ensure that your data and workloads remain available in the event of container failure.
In this article you’ll learn how persistent storage for AKS works and some challenges you may face, how to configure storage for AKS, and how Azure NetApp Files can provide storage benefits.
Read more: Address Persistent Storage Woes in AKS Using Azure NetApp Files