Kubernetes is an open source container management tool for Docker developed by Google based on the Go language. Users can manage Docker container clusters through Kubernetes, and deploy, maintain, expand and schedule containers among multiple hosts or servers.
The principle of Kubernetes is as follows:
- 1) Container group: Multiple containers form a container group, and the containers in the container group share storage volumes.
- 2) Container group life cycle: contains container group status
- 3) Volume: A volume is a file directory, and the container has access rights.
- 4) Service: Service is the logical high-level abstraction of the container group, and also provides external policies for accessing the container group.
There are two types of nodes in Kubernetes, control nodes and work nodes. The control node is responsible for container management, and the worker nodes are mainly used for running containers: Kubernetes has the following features.
- 1) Service discovery and load balancing: Unfamiliar service discovery mechanisms can be used without modifying the application. Kubernetes provides container groups with their own IP addresses and a single DNS name for a set of container groups, and can load balance between them.
- 2) Service topology: Service traffic routing based on cluster topology.
- 3) Storage arrangement: Automatically install user-selected storage systems, such as local storage, public cloud providers (such as Google's GCP or Amazon's AWS) and network storage systems (such as third-party products NFS, ISCSI, GLUSTER, CEPH, CINDER or FLOCKER)
- 4) Self-healing: Restart failed containers, replace containers when nodes die, kill unresponsive containers, and not notify clients until they are ready to serve.
- 5) Automated deployment and rollback: Kubernetes rolls out changes to an application or its configuration incrementally, while monitoring the health of the application to ensure it doesn't kill all instances at the same time. If something goes wrong, Kubernetes will perform a rollback.
- 6) Secrets and configuration management: Secrets and application configurations are deployed and updated without re-imaging and without exposing secrets in the stack configuration.
- 7) Automatically package Bin: Automatically place containers according to their resource requirements and other constraints without affecting availability, improving utilization and saving more resources.
- 8) Batch execution: In addition to services, K8s also supports management of batch processing and continuous integration CI loads, replacing failed containers as needed.
- 9) IPv4/ipv6 dual protocol stack: K8s supports the allocation of IPV4 and IPv6 addresses for container groups and services.
- 10) Horizontal expansion: K8S supports users to use commands through the UI, or automatically scale the scale of the application according to the CPU usage.
- 11) Through Kubernetes, users can deploy and manage Docker clusters more easily and efficiently.