Kubernetes is a containerized application software system that can be easily deployed and managed. It facilitates container scheduling and orchestration.
For application developers, Kubernetes can be regarded as a cluster operating system. Kubernetes provides functions such as service discovery, scaling, load balancing, self-healing, and even leader election, freeing developers from infrastructure-related configurations.
When using Kubernetes, it is like you run a large number of servers as one on which your applications run. Regardless of the number of servers in a Kubernetes cluster, the method for deploying applications in Kubernetes is always the same.
A Kubernetes cluster consists of master nodes (masters) and worker nodes (nodes). Applications are deployed on worker nodes, and you can specify the nodes for deployment.
The following figure shows the architecture of a Kubernetes cluster.
Master node
A master node is the machine where the control plane components run, including API server, Scheduler, Controller manager, and etcd.
In the production environment, multiple master nodes are deployed to ensure cluster high availability. For example, you can deploy three master nodes for your CCE cluster.
Worker node
A worker node is a compute node in a cluster, that is, a node running containerized applications. A worker node has the following components:
When you create a cluster on CCE, the number of master nodes can be set to 1 or 3. Three master nodes can be deployed to create a cluster in HA mode.
The master node specifications determine the number of nodes that can be managed by a cluster. When creating a cluster, you can select the cluster management scale, for example, 50 or 200 nodes.
From the perspective of the network, all nodes in a cluster are located in a VPC, and containers are running on the nodes. You need to configure node-node, node-container, and container-container communication.
A cluster network can be divided into three network types:
When you create a cluster, select a proper CIDR block for each network to ensure that the CIDR blocks do not conflict with each other and each CIDR block has sufficient available IP addresses. After a cluster is created, the container network model cannot be modified. Plan the container network model properly before creating a cluster.
You are advised to learn about the cluster network and container network models before creating a cluster. For details, see Overview.
When a cluster is created, the following security groups are created to ensure cluster security:
After a cluster is created, you can view the created security group on the VPC console.
Do not delete the security groups and related rules automatically configured during cluster creation. Otherwise, the cluster will exhibit unexpected behavior.
Status |
Description |
---|---|
Creating |
A cluster is being created and is requesting for cloud resources. |
Normal |
A cluster is running properly. |
Scaling-out |
A node is being added to a cluster. |
Scaling-in |
A node is being deleted from a cluster. |
Hibernating |
A cluster is hibernating. |
Awaking |
A cluster is being woken up. |
Upgrading |
A cluster is being upgraded. |
Unavailable |
A cluster is unavailable. |
Deleting |
A cluster is being deleted. |