“This is my 20th day of the November Gwen Challenge.The final text challenge in 2021”.
preface
Kubernetes, or K8s for short, refers to the eight characters “ubernete” in the middle of the name. K8s is an open source, 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 powerful. K8s provides a mechanism for application deployment, planning, updating and maintenance.
An overview of the
K8S is a containerized cluster management system that Google opened source in 2014. We can use K8S for containerized application deployment, and K8S is conducive to application expansion, making project deployment more concise and efficient.
features
1. Automatic deployment
Automatic application deployment based on containers
2. Repair yourself
When the container fails, the container is restarted. In multi-node scenarios, nodes are switched automatically. When all nodes fail, the container is redeployed and scheduled
3. Scale horizontally
Extend and tailor application services with simple commands
4. Service discovery
Supports service discovery and load balancing
5. Rolling updates
You can update the applications running in the application container at a time or in batches based on the application changes
6. Roll back the version
Roll back the deployed applications in real time
7. Key and configuration management
Deploying and updating keys and application configurations without rebuilding the image is similar to hot deployment
8. Storage orchestration
The storage system supports local storage, network storage, and public cloud storage services
9. The batch
Provides one-off and scheduled tasks for batch data processing and analysis.
Cluster Architecture Component
Master component (Main control node)
1. API server
Cluster unified entry, restful, to etCD storage
2. scheduler
Node scheduling: Select Node application deployment
3. controller-manager
In the cluster, the background is unified to handle common background tasks in the cluster. Each resource corresponds to one controller
4. etcd
A storage system used to store clustered data
Node component (working node)
1. kubelet
The master node represents the node that manages the operations of the local container
2. kube-porxy
Provides network proxy, load balancing and other operations
The core concept
1. Pod
- Minimum deployment unit
- A collection of containers
- Sharing network
- The life cycle is short, and a restart generates a new one
Pod
2. Controller (create pod)
- Ensure expected
pod
Copy number- Stateless application deployment (ready-to-use)
- Stateful application deployment (usage depends on certain conditions)
- Ensure that all
node
Run the samepod
- One-off tasks and scheduled tasks
3. Service
Define access rules for a set of PODS