Summary of Kubernetes knowledge points

what

Kubernetes is a brand-new leading solution for distributed architecture based on container technology (derived from Brog, which is the crystallization of Google's more than ten years of experience);

Kubernetes is an open development platform (non-invasive, existing systems are migrated to Kubernetes);

Kubernetes is a complete distributed system support platform (complete cluster management capabilities).

why

The most direct feeling of using Kubernetes is that we can develop complex systems lightly;

Secondly, Kubernetes is fully embracing the microservice architecture (the core of microservices is to split a huge monolithic application into many small interconnected microservices. A microservice may be supported by multiple instance copies, and the number of copies can be Dynamic adjustment as the system load changes);

Finally, the Kubernetes system architecture has super horizontal scalability.

Basic Concepts and Terminology in Kubernetes

Master

Master is the cluster control node, running processes such as kube-apiserver, kube-controller-manager, kube-scheduler, etcd;

Node

Nodes other than the Master node in the cluster.

kubectl get nodes;kubectl describe node nodename

Under

A set of containers are running in the Pod, including a 'root container' Pause (1. The state of pause represents the state of the overall business container, 2. The business container shares the IP and volume of the pause, etc.) and many business containers. Containers in a Pod can communicate directly with Pods on other hosts.

Label

A label is a key=value pair, and Label Selector implements a simple and general object search mechanism similar to SQL in this way. Version labels, environment labels, schema labels, partition labels, quality control labels, etc.

Replication Controller (RC)

RC defines an expectation scenario, which is to declare that the number of replicas of a certain Pod conforms to an expected value at any time. (1. Expected number of Pods; 2. Label Selector for filtering target Pods; 3. Pod template for creation). kubectl scale rc rcname --replicas=2. (Note: Deleting RC will not affect already created Pods)

Deployment

Deployment is very similar to rc, deployment can know the change process of creation in real time.

Horizontal Pod Autoscaler (HPA)

Pods are automatically scaled horizontally. By tracking and analyzing the load changes of all target Pods controlled by RC, it is determined whether the number of copies of the target Pods needs to be adjusted in a targeted manner. (Indicators: 1. CPUUtilizationPercentage, 2. Application custom indicators, tps qps, etc.)

Service

Each service is a 'microservice' in the microservice architecture we often mention.

NodeIP: The IP of the Node node, the actual IP;

PodIP: The IP of the Pod, which is allocated by the docker engine according to the IP segment of the docker0 bridge, usually a virtual Layer 2 network;

ClusterIP: The IP of the service, which is a virtual IP, a 'forged' IP.

Volume

Volumes have the same lifecycle as Pods, but are not related to the lifecycle of containers.

emptyDir、hostPath、gcePersistentDisk、awsElasticBlockStore、NFS等

Persistent Volume(PV PVC)

PV can be understood as a corresponding piece of storage in a network storage in the Kubernetes cluster (1, pv can only be network storage, does not belong to any Node, but can be accessed on each Node; 2, pv is not defined on Pods , but is defined independently of Pod; 3. Types supported by pv: GCE Persistent Disks, NFS, RBD, iSCSCI, AWS ElasticBlockStore, GlasterFs, etc.). pv is stateful (available-idle, bound-has been bound to a pvc, released-corresponding pvc has been deleted, but resources have not been recovered, failed-pv automatic recovery failed)

Namespace

Used for resource isolation, managed separately.

Annotation

Record some additional information, such as build information, release information, log repository, team contact information, etc.






Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325933697&siteId=291194637