15 days to get Kubernetes one of the series: Basic Concepts and Architecture

introduction

KubernetesAs a best practice cloud native, it has become a de facto standard container orchestration engine, but it also has become the era of container cloud infrastructure. This series of articles will lead us into the Kubernetesworld.

  • Architecture Introduction
  • core concept
  • to sum up

First, the architecture introduced

Here Insert Picture Description
(Picture from the network)

The figure can be seen that the following components, using a special icon indicates Service and the Label:
Pod
Container (container)
the Label (label) (tag)
the Replication the Controller (copy controller)
Service (Enter Image Description here Wallpaper) (service)
the Node (node)
Kubernetes master (Kubernetes master node)


Second, the core concept

1, POD
POD is to Kubernetesproject a minimum scheduling unit. But we must be clear that, POD is a logical concept. POD is actually a set of shared some container resources. We often say that the vessel, its essence is the process. If we say that Kubernetesthe future of cloud native operating system, the container like a mirror image of the operating system exefiles. But the operating system does not exist as a single process, it is in the form of process groups to accomplish specific business. And Kubernetesthat is the concept of process group mapped to a container cloud.
PODAll containers share the same Network Namespace, and may declare share the same Volume.

2, Label
Label in key/valueadditional key-value pairs to any object, such as Pod, Service, Node, RC ( ReplicationController) / RS (ReplicaSet) and the like, which is used to transfer user-defined attributes.

3, Replication Controller
Kubernetes through Controllerimplemented for PODoperation. DeploymentIt defines the overall operation of the arrangement of containers, such as provided spec.replicas = 2. So when in this cluster, the number of carry Pod custom label is greater than 2, there will be old Pod is deleted; on the contrary, there will be a new Pod is created.
We can look at pkg / controller directory Kubernetes project:


$ cd kubernetes/pkg/controller/
$ ls -d */              
deployment/             job/                    podautoscaler/          
cloud/                  disruption/             namespace/              
replicaset/             serviceaccount/         volume/
cronjob/                garbagecollector/       nodelifecycle/          replication/            statefulset/            daemon/
...

Here Insert Picture Description
(Picture from the network)

4, Service
POD may not be persistent, when the IP may change after it is restarted, then the front end of the container how to find the right rear end of the container it? On the other hand it is because a group Podalways have load balancing between instances of demand. ServiceIt is a series of definitions Podand strategies to access the Pod layer of abstraction. The main role of Service services, as is Podthe Agent Portal ( Portal), thus overriding Podthe external exposure of a fixed network address.
ServiceBy kube-proxycomponent, together with iptablesthe common realization.
As a Servicedefinition.
For we created earlier named hostnamesthe Service, once it has been submitted to Kubernetes, it kube-proxycan, through Servicethe Informerperceived such an Serviceadded object.


apiVersion: v1
kind: Service
metadata:
  name: sayservice
spec:
  selector:
    app: sayservice
  ports:
  - name: default
    protocol: TCP
    port: 8080
    targetPort: 9376

Here Insert Picture Description
(Picture from the network)

5、Node

Running the two most important components of the node - kubeletand kube-proxy. NodeNode is the Kubernetescluster workload nodes, each Nodewill Masterassign some of the work load ( Dockercontainer), when a Nodetime is down, the workload on the Master will automatically be transferred to other nodes up.


Third, the summary

This paper describes Kubernetessome of the core concepts, I put together Kubernetesa mind map, I hope you can give us clarify the relevant concepts and classification, as follows:
Here Insert Picture Description

Published 88 original articles · won praise 49 · Views 100,000 +

Guess you like

Origin blog.csdn.net/Diamond_Tao/article/details/102862952