Starting with Kubernetes
Running containerized applications in the cloud is no longer an optional offering but a requirement. Given the elasticity and efficiency of containers, most large companies have already made the jump. Kubernetes has taken the front runner position as the leading container solution.
Today user base will no longer accept downtime. We, as the builders of the cloud and infrastructure services, need to find a method to perform maintenance and update without interrupting their services Containers provide this isolated environment while securely scaling. In this time for real-time self-healing application services, Kubernetes is the preferred method for packaging, deploying, and update web apps.
What is Kubernetes?
Kubernetes is a container management system developed originally by Google. Kubernetes helps to manage containerized applications in various types of physical, virtual, and cloud environments. Google Kubernetes is a highly flexible and dynamic tool to consistently deliver complex applications running on clusters of hundreds to thousands of individual servers.
Kubernetes is used for items such as automated rollouts and rollbacks due to issues, self-healing capabilities, automated scheduling, loosely coupled microservices ecosystem, horizontal scaling with native load balancing capabilities, enterprise-ready features in Alibaba cloud, and infrastructure that is robust and innovative.
Breakdown of need-to-know terminology for Kubernetes
What is a Node?
It is a single host which can run on a physical or virtual machine. A node should run both kube-proxy, minikube, and kubelet which are considered as a part of the cluster. A pod is a combination of single or multiple containers that logically run together on nodes
What is a Cluster?
It is a collection of hosts(servers) that helps you to aggregate their available resources. That includes ram, CPU, ram, disk, and their devices into a usable pool.
What is a Master node?
The master is a collection of components that make up the control panel of Kubernetes. These components are used for all cluster decisions. It includes both scheduling and responding to cluster events.
The master node is responsible for the ownership and management of the Kubernetes cluster. It is the entry point for all kind of administrative tasks. There might be more than one master node in the cluster to check for fault tolerance. The master node has various components like ETCD, Scheduler, API Server, Controller Manager, and more. (The API server acts as an entry point for all the REST commands used for controlling the cluster, as most external applications require an entry point to call API).
What are Worker nodes
Worker nodes, sometimes called slave nodes, are another essential component that contains all the required services to manage the networking between the containers, communicate with the master node, which allows you to assign resources to the scheduled containers. A Docker container runs on each worker nodes, running the configured pods that you allocated. Remember, the Kublet gets the config for the pod from the API services, this will ensure the containers are up and running and healthy. Also, note that Kube-proxy will act as a load balancer and network proxy to perform service on a single worker node
What is a Scheduler
It is responsible for distributing the workload & owns scheduling tasks for the worker nodes. Tracking how the working load is utilized on cluster nodes allows you to place the workload on resources that are available for use and accept the workload.
What is a Stateful Set?
It is a specialized pod control that offers ordering and uniqueness. It is mainly used to have fine-grained control, which you have a particular need regarding deployment order, stable networking, and persistent data. Note that Daemon sets are another control that deployed pods to perform maintenance and offer the nodes up services.
What is a Replication Set?
Replication sets are an interaction on the replication controller design with flexibility in how the controller recognizes the pods it is meant to manage. It replaces replication controllers because of their higher replicate selection capability. Also, know that a replication controller is an object which defines a pod template. It also controls parameters to scale identical replicas of Pod horizontally by increasing or decreasing the number of running copies. Also, Deployment is a common workload that can be directly created and manage. Deployment use a replication set as a building block which adds the feature of life cycle management.
What is a Namespace?
It is a logical cluster or environment. It is a widely used method which is used for scoping access or dividing a cluster.
Basic architectural layout
NOTE: You should also know what Etcd is. etcd components store configuration detail and wright values. It communicates with the most component to receive commands and work. It also manages network rules and port forwarding activity.
Also, Alibaba Cloud has a resource called Node Pools for its container service that responds well to our needs, but they are not well-supported through popular IAC (such as Terraform) and in an ever-changing and ever-scaling environment making calls to API directly or using a UI to modify multiple resources become less convenient the more you begin to scale-up.
Docker vs Kubernetes
The biggest one for me is Docker swarm does not allow auto-scaling while Kubernetes allows auto-scaling. Kubernetes allows you to configure share storage volumes between multiple containers inside the same pod. Also, you can manually configure your load balancing settings wherein Docker, you cannot. At the same time, Swarms in Docker spin up quickly where Kubernetes takes longer yet offers a most sturdy robust solution. Kubernetes has built-in logging and monitoring tools, where Dock uses 3rd parties’ integrations.
Alibaba Cloud Container Service for Kubernetes (ACK)
This cloud-native microservice system architecture service was designed to meet the demand for resources while keeping costs low, businesses need to be able to size up such applications for certain heavy workloads without paying for excess resources during idle hours.
Alibaba Cloud allows you to deploy a containerized application on a Kubernetes cluster and set up auto-scaling to automatically adjust the compute capacity of the cluster in response to workload changes, which we will show in the example below. You can dynamically add compute resources in response to increased workload requirements and automatically instantaneously destroy compute resources to save costs based on utilization thresholds. You can also dynamically provision storage volumes to accommodate data growth. You can even dynamically provision storage volumes to accommodate data growth
You are even able to combine services for robust globally dispersed solutions using services like ECS bare metal instances with ACK on top of it. Now we will walk through an example of how to deploy Kubernetes in a highly scalable environment quickly and efficiently.
Cluster Management
- You can create clusters in the console simply using GPU-accelerated instances and ECS Bare Metal instances in a cluster. You can also deploy your cluster across zones to ensure high availability.
- Provides optimized OS images for Kubernetes containers. Offers Kubernetes versions and Docker versions with high stability and security
- Supports multi-cluster management and cluster federation management. You can also deploy your cluster across zones to ensure high availability.
- You need to manually deploy and develop clusters by yourself.
- You need to explore and develop Kubernetes by yourself.
Application Management
- Supports canary releases and blue-green releases.
- Supports application monitoring and auto scaling.
- Provides a built-in application store that deploys applications using Helm. Provides an App Catalog to simplify service integration.
- You need to explore and develop Kubernetes by yourself.
Network Management
- Provides a high-performance network plug-in that is optimized for Alibaba Cloud to assign ENIs to pods. The network performance of a VPC with this plug-in is 20% higher than a regular network solution.
- Supports access policies and bandwidth throttling for containers.
- You need to use network plug-ins from the community for adoption.
- You need to explore and develop Kubernetes by yourself.
Storage Management
- Supports Alibaba Cloud cloud-disks, local disks, NAS file systems, CPFS file systems, and OSS buckets. Provides CSI and FlexVolume as volume drivers.
- Supports dynamic creation and volume migration.
- You need to explore and develop Kubernetes by yourself.
- O&M Management
- Allows you to upgrade Kubernetes versions and automatically add nodes to a Kubernetes cluster.
- Provides a high-performance log collection agent that can handle 100,000 requests per second.
Make sure you understand the differences between Dedicated vs Managed vs Serverless clusters:
Resources recommended
Quick start guide to Alibaba Cloud Container Service for Kubernetes
Self-built Kubernetes on Alibaba Cloud
About Roopu Cloud
If you have any questions or concerns about Alibaba Cloud, you can contact us. We are experts in building and implementing cloud solutions in the Alibaba Cloud platform as well as in other Chinese cloud platforms. Let us help you!