Continental Innovates with Rancher and Kubernetes
Most Kubernetes deployments live on the cloud. According to the CNCF, while 63 percent of companies use AWS for Kubernetes, 29 percent are deploying Kubernetes on Azure, and the number is rapidly growing. Microsoft Azure provides mature Kubernetes tools, primarily the Azure Kubernetes Service (AKS).
In this post, we’ll show you how to run your first Kubernetes cluster on AKS, and how to manage enterprise Kubernetes deployments on AKS with Rancher.
In this article, you will learn:
Kubernetes (K8s) is a container orchestration tool you can use to manage your containerized applications and microservices. It is an open-source tool created by Google.
Kubernetes offers the following features:
The purpose of Kubernetes is to reduce the complexity of managing container deployments at scale. You can use Kubernetes in almost any environment, including public and private cloud platforms and on-premises.
When choosing a container orchestration tool, Kubernetes is an obvious choice. It is the most commonly used platform and is widely supported by many vendors, including Microsoft. If you are planning to deploy Kubernetes in a public cloud, there are a few reasons why Azure may be the best choice for you.
These reasons include:
If you are not yet using Azure, or are in the process of migration, Kubernetes can help you make this process easier. With containers, you can more easily lift and shift legacy applications. You can also more easily transfer applications from other cloud providers you may be using.
AKS is Azure’s managed Kubernetes option. It aims to reduce the operational overhead and expertise needed to deploy k8s to Azure. AKS manages the most basic tasks of Kubernetes for you, including:
With this service, you are only responsible for managing your worker nodes. While the service itself is free you are also responsible for any costs associated with worker nodes, including storage and networking.
To use AKS, you can create clusters in the Azure Portal or with the Azure CLI. Alternatively, you can use templates along with Resource Manager or Terraform to deploy. Regardless of the method you choose, AKS deploys and configures your cluster and nodes for you. You also have the option of configuring additional features, such as Azure Active Directory integration, monitoring specifications, and advanced networking.
The following guide shows you how to create a cluster in AKS via the CLI. These steps have been adapted from the Azure documentation.
When you follow this process, you need to create an Azure Active Directory service principal to enable your cluster to interact with your Azure resources. This is done automatically if you do not specify a principal.
In the below example, the automatically created principal is granted access to your Azure Container Registry instance. You can customize what resources are attached by changing this value.
az aks create \ --resource-group {Resource group name} \ --name {Cluster name} \ --node-count 2 \ --generate-ssh-keys \ --attach-acr {ACR name}
The creation process takes a few minutes. Once complete, you are provided a JSON file with information about your deployment.
Once your cluster is created, you can connect to it from your local machine, using kubectl. kubectl is the built-in CLI for k8s.
This tool is already installed for you if you are working with Azure Cloud Shell. If not, you can install it manually with the following command:
az aks install-cli
Next, you need to configure kubectl. This requires getting AKS credentials. You can obtain these credential with the following command:
az aks get-credentials --resource-group {Resource group name} --name {Cluster name}
Once credentials are obtained, you need to verify that kubectl can successfully connect to your cluster. You can do this with the following command:
$ kubectl get nodes
This will result in an output such as the one below:
NAME STATUS ROLES AGE VERSION Aks-nodepool-test Ready agent 50m v1.14
Although feature-rich and undeniably convenient, AKS isn’t the best fit for every organization or use case. By running containers in Azure/AKS for all their Kubernetes needs, enterprises are locked into a single vendor ecosystem and for most, an unnegotiable cost.
In fact, 81 percent of respondents in a Gartner survey of public cloud users revealed that they are working with two or more providers. As such, multi-cloud has become the “new normal.” Operating containers on a range of platforms, such as multiple cloud platforms or hybrid environments, makes orchestration and management more complex. If you are planning to use AKS in addition to other deployments, Rancher can help you standardize and centralize your configurations.
By abstracting the management control plan from a particular cloud provider and architecting cloud-native applications to run on any certified Kubernetes distributions, organizations gain application portability. They also gain cycles that would have been wasted on platform-specific configurations, network interfaces and management workflows.
Rancher includes a variety of features to make your deployments simpler, including:
Rancher does all this without locking you in to yet another vendor. Learn more about the Rancher platform.