Introduction to Kubernetes (k8s) concepts

1. k8s overview and features

K8s is an open source application used to manage containerized applications on multiple hosts in the cloud platform. The goal of k8s is to make the deployment of containerized applications simple and efficient. k8s provides a mechanism for application deployment, planning, updating, and maintenance. . K8s is Google's open source containerized cluster deployment management system in 2014. Using k8s can deploy containerized applications. It is conducive to application expansion. K8s target implementation makes the deployment of containerized applications simpler and more efficient.

k8s features

  • Autoboxing: Automatically deploy application containers based on the resource configuration requirements of the container for the application environment (no manual intervention required)
  • Self-healing: When a container fails, it will be restarted. When there is a problem with the deployed Node node, the container will be redeployed and rescheduled. When the container fails the monitoring check, the container will be closed until the container is running normally, and services will not be provided to the outside world.
  • Horizontal expansion: Expand or trim the container through simple commands, user UI interface, or based on resource usage such as CPU
  • Service discovery: Users can give k8s its own capabilities to achieve service discovery and load balancing without using additional service discovery mechanisms.
  • Rolling update: One-time or batch updates can be made to applications running in application containers based on application changes.
  • Version rollback: Based on the application deployment situation, the historical version of the application running in the application container can be instantly rolled back
  • Key and configuration management: Keys and application configurations can be deployed and updated without rebuilding the image, similar to hot deployment
  • Storage orchestration: Automatically implement storage system mounting and application, especially for stateful applications to achieve data persistence. The storage system can come from local directories, network storage (NFS, Gluster, Ceph, etc.), public cloud storage services
  • Batch processing: Provides one-time tasks and scheduled tasks; meets batch data processing and analysis scenarios

2. k8s architecture components

k8s cluster architecture
Insert image description here

  • Components: master (master node) and node (worker node)
  • Master node: k8s cluster control node, schedules and manages the cluster, and accepts cluster operation requests from users outside the cluster;
    Master Node is composed of API Server, Scheduler, ClusterState Store (ETCD database) and Controller MangerServer
    • API server: The unified external entrance of the cluster. It provides operations with Restfull. It will transfer various operations to etcd storage and provide a hub for data interaction and communication between other modules (other modules query or modify data through API Server, only API Server Directly operate etcd, which is the entrance to resource quota control.
    • scheduler: used for node scheduling, select a node node to deploy the application
    • controller-manager: to handle regular background tasks in the cluster, one resource corresponds to a controller (for example, an order operation will correspond to an order business controller)
    • etcd: storage system, used to save relevant data in the cluster
  • Node: cluster working node, running user business application containers
    • kubelet: The representative sent by the master to the node node, manages the container in the current node, and manages various operations of the local container, such as container life cycle, container creation, destruction, etc.
    • kube-proxy: Provides a network proxy, which can be used to implement load balancing functions

3. k8s core concepts

Pod : It is the smallest deployment unit in k8s. A pod is a collection of containers. The containers in a pod share the network. The life cycle of the pod is short. The server restart will create a new pod. Controller: The controller
can ensure The number of pod copies ensures that all nodes run the same pod. It also supports one-time tasks and scheduled tasks.
Service : Define a set of pod access rules, such as orders and shopping carts. Service is forwarded to different nodes based on pod load capacity and other rules. pod for processing.

Guess you like

Origin blog.csdn.net/qq_43456605/article/details/130486540