All Products
Search
Document Center

Container Service for Kubernetes:Cluster design

Last Updated:Dec 01, 2023

This topic describes how to design your Container Service for Kubernetes (ACK) cluster and provides answers to some frequently asked questions about cluster design.

How do I run containerized applications in ACK clusters?

You can deploy application code to Alibaba Cloud or on your on-premises machine. You can deploy code of any programming languages into containers and use the containers to run and deliver applications. Application development in ACK clusters involves the following phases:

  1. Write code.

  2. Use a Dockerfile to build an image.

  3. Push the image to an image repository. You can use Container Registry to store the image.

  4. Deploy and run a containerized application. You can use Container Service for Kubernetes as a one-stop platform to manage containerized applications.

Term

Description

Dockerfile

A Dockerfile is a text file that contains all the commands required for packaging code into an image. For more information, see Build an image for a Java application by using a Dockerfile with multi-stage builds.

Image

An image is a package of software. Compared with JAR, WAR, and RPM files, images contain all the files that are required for building runtime environments to run containers. You can create a container from an image to run an application.

For more information, see Deploy a stateless application from an image.

Container

A container is a group of processes that are isolated from others. A container has a separate file system and features resource isolation and limitation. ACK provides comprehensive lifecycle management for containerized applications. For example, you can use ACK to schedule pods to specified Elastic Compute Service (ECS) nodes or scale out ECS nodes when the loads of your service increase.

For more information, see Schedule pods to specific nodes, Auto scaling of nodes, and Containers and images.

What Alibaba Cloud services can be used together with ACK?

When you use ACK, you need to create cloud resources provided by Alibaba Cloud, including ECS instances, networks, and storage resources, for your applications. You can create a bundle that involves the least services based on the following figure to obtain technical support in cloud-native system development, security compliance, microservices, observability, storage, computing, and networks. The technical support can help you better develop and maintain your ACK clusters.

We recommend that you use the observability services provided by Alibaba Cloud, including logging and monitoring services. You can use these observability services to monitor your ACK clusters, including infrastructure resources, containers, application performance, and workloads.

Which ACK cluster type should I select?

For more information about the characteristics and use scenarios of ACK clusters, see What is Container Service for Kubernetes?

How do I decide the size of an ACK cluster?

You must decide the size of an ACK cluster based on the traffic loads of your applications. You can use the following formula to decide the cluster size.公式

For example, you want to deploy 100 microservices, each of which runs on five ECS instances. Each ECS instance requires 2 vCPUs and 4 GB of memory. In this example, the redundancy rate is set to 10%. The total number of vCPUs = 100 × 5 × 110% × 2 = 1,100. The total amount of memory = 100 × 5 × 110% × 4 GB = 2,200 GB.

If your applications need to handle fluctuating workloads, you can scale out containers during peak hours. For more information, see Auto scaling overview.

How do I choose ECS instances in an ACK cluster?

When you determine node specifications and quantity for an ACK cluster, we recommend that you prioritize node specifications over quantity. For example, we recommend that you use a small number of high-specification ECS instances instead of using a large number of low-specification ECS instances to meet your requirements. In scenarios where a large number of applications are deployed, we recommend that you use ECS bare metal instances. For more information, see Create an ECS bare metal instance. You must determine the specifications of worker nodes based on the vCPU requirement of your ACK cluster and the tolerance of your applications to service unavailability. For more information, see Suggestions on choosing ECS specifications for ACK clusters.

Which Container Registry edition should I choose, Enterprise Edition or Personal Edition?

An important step in containerized application development is to package code into a container image. You can use Container Registry to host, distribute, and pull container images. Container Registry also provides version management for your container images. Container Registry is classified into two editions:

  • Container Registry Personal Edition is suitable for individual developers and provides free quotas of storage and data transfer.

  • Container Registry Enterprise Edition is suitable for enterprise users who require high security and efficient image management. This edition meets the requirements in scenarios where the business is deployed on a large scale across regions.

For more information, see What is Container Registry?

Can I migrate workloads that are deployed on Alibaba Cloud or on-premises machines to ACK clusters?

Yes, you can migrate workloads that are deployed in self-managed Kubernetes clusters to ACK clusters. For more information, see Migration scheme overview and Solution for migrating cloud-native applications to Alibaba Cloud.

Important

Before you start the migration, make sure that your applications are not interrupted during the migration.