k8s in the end how hard? Let's vernacular vernacular 2

kubernetes in the end how hard?
Look at the following vernacular: service principle of network communication
service from the outside of k8s service as an access terminal which is actually inside the POD
--------------------------- ---------------------------
then talk about the pod: pod running basic functions supported by the mirror k8s on the basis of the next node inside the pod,
pod the container on this Pause network stack container volume and mount the volume (actually hang logical functions and docker's)
_______________________________________________________________________________
so What is the relationship between the service and the pod:
K8S each pod to put a label (label) [ understand docker knows], on this condition, such as we are looking for mysql container
so his selection criteria is the name = mysql the pod, and the pod is now playing mysql label, natural serivce to find a pod of container
this would solve the problems associated with the service and pod
-------------------------------- -----------------------
So the question is when you need to extend the period of operation found k8s container pod, then there is a concept called kubernetes RC
or yaml, create a Replication Controller can be expanded and upgraded to solve problems associated with the expansion of the service needs of pod
wording:
Define (1) the target Pod # is that name
(2) the number of copies of target Pod need to run (Replicas) # yaml do see the number that is there
(3) to monitor target Pod label (Label) # what you need pod label associated with the expansion servie
------------------------------------------- -------------
Note: Kubernetes the master if you shoot down the entire cluster will shoot down kubernetes
then master it down answer is why he has the function of
function Secret:
Kube-apiserver: provided the key service process http Rest of the interface is the only entrance kubernetes in CRUD and other operations of all resources, is the entrance to process cluster control
kube-controller-manager: automation control Center kubernetes in all resource objects
kube-scheduler: responsible resources process scheduling (Pod scheduling) # need to implement the cpu and gpu schedule is needed to achieve here is
etcd: data objects kubernetes all resources are all stored in etcd in
----- --------------------------------------------------
If you do not know what the previous node is:
Secret: a cluster of them in addition to Master, all other machines node nodes, each node is a master distribution is docker container load, when a node goes down, the workload which will be master
automatically transferred to other nodes up.
Ouch: it has a command on the node, but do not worry just three:
kubelet: pod is responsible for the corresponding construction of a container, stop. At the same time cooperation and master node, cluster management to achieve the basic functions
kube-proxy: enable communication with the load mechanism kubernetes service is an important component
Docker Engine: Docker engine, the unit responsible for the creation and container management (docker Skilled very simple )
------------------------------------------------- --------
sum up:
in cluster management, Kubernets the machine in the cluster is divided into a Master node and group work node (node),
which runs a set of processes related to cluster management at the Master node kube-apiserver, kube-controller- manager and kube-scheduler,
those processes to achieve resource management of the entire cluster, Pod scheduling, elastic contraction, security control, system monitoring and management functions such as error correction, and automatic completion of all.
Node in the cluster as working node, running a real application, running on a minimum Node Kubernetes management unit is Pod.
Running Kubernetes of kubelet, kube-proxy server process on Node, the service process is responsible for Pod to create, start, monitor, restart, destruction, and load balancing software model.

-
txter: Mr.gao
DATE: 2019.12.12 / 20: 34 Friday
Weather: Breeze
------------------------------ -------------------------------------------------- ----
specialized vernacular introduce pod:
pod what features we know, but the pod specific role it plays:
the original pod contains a pause container such as: gcr.io/google_containers/pause-amd64, in addition also contains users container business more closely related (user container1; user container2 ...) this is the pod which contains all of the containers
so why should pod is designed to look like this:
1.Pause container is designed pod root container (feeling and also the concept of linux is very fit, but the original concept linxu file into a mirror-image basis.) so it represents the state of the entire container group
2.pod in the other months more containers would share ip Pause containers, share Pause container mounted Volume.
Summary: then it is obvious that clear why the pod construction and pause container exists and why his user container to container as the root mean pause
then think about:
the article is said:
Each pod is assigned a unique ip address Kubernetes is, a plurality of containers in a pod shared ip:
(Note: a plurality of containers inside the pod, on behalf of the container application sharing ip pod1 of the pod, the pod pod2 to and shared application may communicate ip)
virtual network technology Layer communication between the pod
PS: Of course you want to communicate between pod and pod, or how to implement various functions
--------------------------------- -------------------------------------------------- ---
ETCD storage:
Common pod:
normal pod once created, will be placed in storage ETCD subsequently scheduled on kubernetes master node and a specific binding (the binding), followed by corresponding pod kubelet processes on the node instantiation
into a set of associated containers docker run. When the pod inside a container stop, kubernetes will automatically detect this problem and restart the pod (pod restart in all containers), node goes down if the pod where
will all of this node to the other pod from the new schedule node
summary: in fact, this is also indirectly explains the function kubernetes orchestration tool of
static pod (sTatic Pod):
static pod is managed by kubelet pod exists only on a particular node, they can not be managed through the API server can not be associated with ReplicationController (RC), Deployment. or DaemonSet
and kubelet can not on their health checks, static pod is always created by kubelet, and always at the node kubelet resides (tm Raozui which can also well I insist on looking down, but also to make it clear author)

Simply put: that kubelet created on a static node pod pod This static can only be managed by the node kubelet own
________________________________________________________________________________________________________________________________ \
create static Pod in two ways: HTTP mode and profile mode

1. Profiles way

First, we need to set the startup parameters kubelet the "config", specify the directory kubelet need to monitor configuration file is located, kubelet periodically scans the directory, and create an action based on that directory * .yaml or * .json file

Explanation: The start time is actually kubelet specified config = xxx yaml xxx.json I feel like this
but the article in the static-web.yaml not a little egg with centos did not write the test before it ran aground here, mainly to know this to say

___________________________________________________________________________________________________________________________________- \
Endpoint
Pod of IP together with its container port (container Port), to form a new concept --- Endpoint it represents external communications Pod address this in a service process.
Pod there are a plurality of Endpoint, such as we have defined as when a Pod Tomcat, can begin to expose these two ports and port services Endpoint

Simply put: that is yaml document written this field is used to write the service port and port exposure and docker container exactly the same idea
___________________________________________________________________________________________________________________________________ \
Event
Event is an event record, recorded in the earliest generation time, last time to reproduce, duplicate frequency ... etc. and why this event as a result of a lot of information, event will be linked to a specific resource, is an important reference failure of the investigation,
the Node contains the description of event, and the pod also has event record.
when they could not find pod created, you can describe pod [pod name] with kubectl to view, locate the problem

Simply put: This Event is very important is to build a general service use shoot the wrong shot wrong here is the important thing.
what? Pod will not find the name of the command is this: kubectl get pods ## print run of all the container you need to find the name of the pod, such as the dashboard like dashborad

————————————————————————————————————————————————————————————————————————————————————————————、

Here it is necessary to do to build up a so kubernetes next start building the experimental kubernetes I knocked off before re-build a fat one k8s build clusters blog

————————————————————————————————————————————————————————————————————————————————————————————。

txter:Mr.gao

date: 2019/12/14 | 16: 34 Saturday 

Weather: Breeze

Guess you like

Origin www.cnblogs.com/sxgaofeng/p/12039742.html