This is the 25th day of my participation in the August Genwen Challenge.More challenges in August

What is kubernetes

K8s is a distributed architecture service management solution based on container technology

All services are isolated from each other, and k8S is used to manage services in a unified manner to achieve system monitoring and load balancing. Complete realization of a complete set of system needs to build the environment

Why use Kubernetes

Fully embrace micro services

Services can be split out, resulting in a large number of services. And service governance and other issues. Kubernetes is perfect for a lot of service management

And Kubernetes put forward many concepts to embrace microservices, such as gateway, such as copy replication, etc

Complex systems are light

It only needs one architecture design, several developers to realize the business, and one operation and maintenance to complete the construction of complex systems. Intensive collaborative development brings some problems, etc

System relocation is easier

Replicas can be made to make it easier to copy the complete service architecture to where it needs to be deployed

Elastic expansion mechanism

This can be done by rapidly expanding certain services on some public clouds

Automatic leasing, automatic deployment, automatic offline, and automatic fusing can be performed dynamically in heavy traffic situations.

Some noun concepts of K8S

Master

Cluster control node, each K8S cluster needs a master to be responsible for the management and control of the whole cluster, basically all k8S control commands are issued to it. Is the “brain” of K8S.

Master three processes

  • Kubernetes API Server (Kube-APiserver), provides Http REST interface to achieve all resources in K8S add, delete, change, search operations.
  • Kubernetes Controller Manager (Kube-Controller-Manager), automatic control center, resource object management system
  • Kubernetes Scheduler (kube-Scheduler), a Scheduler that schedules resources and traffic from a node when it goes down.

Node

All other nodes of K8S are called nodes, and they carry out disaster prevention of single point of failure. Once a node fails, master will schedule POD to work on the specified node according to automatic algorithm or self-defined policy

Key processes include

  • Kubelet creates and stops pods
  • Kube-proxy is an important component of the communication and load balancing mechanism of Kubernetes Service.
  • Docker Engine is responsible for managing all containers under the node

pod

The smallest management element, a “logical host” in a container environment. A POD has independent resource management and network services. A Pod consists of multiple containers that are related and share disks.

For example, a payment service requires a springBoot project, a Tomcat service, a mysql service, and so on, all to be used exclusively by the payment service, so these can form a POD

Kubernetes assigns a unique IP address to each Pod

Labels

The tag can be used to classify a specific group of objects (for example, all women)

Identify a pod, such as some pods that are all databases, to indicate that these are a cluster of databases