Kubernetes Chapter VIII Pod Controller

 

Deployment

Brief

Deployment provides a statement defined in formula (Declarative) method Pod and ReplicaSet, used to replace the previous ReplicationController to facilitate the management application.

 

Deployment concept resolve
 what Deployment that? 
Deployment for the Pod and Replica Set (Next Generation Replication Controller) provides a declarative update. 
You only need to describe what you want in Deployment target state, Deployment controller will help you to Pod and the actual state of Replica Set changes to your target state. You can define a new Deployment, you can create a new one to replace the old Deployment. 
A typical use is as follows: 
Use Deployment to create ReplicaSet. ReplicaSet create a pod in the background. Check the startup state to see if it succeeds or fails. 
Then, to declare a new state Pod by updating Deployment of PodTemplateSpec field. This will create a new ReplicaSet, Deployment will follow the rate control of the pod from the old to the new ReplicaSet ReplicaSet in. 
If the current state of instability, roll back to the previous Deployment revision. Every time rollback revision updates the Deployment of. 
Deployment expansion to meet the higher load. 
Pause Deployment to apply multiple repair PodTemplateSpec, and then back online. 
Deployment of the state of the line is determined whether or hang live. 
Remove old unnecessary ReplicaSet.

  

ReplicaSet

ReplicaSet aim was to maintain a stable set of copies Pod at any given time. Therefore, it is usually used to ensure the availability of the same specified number of Pod.

Works ReplicaSet of 
ReplicaSet is defined using the field, including specifying how to recognize Pod selector which can be obtained, indicating the number of multiple copies of the Pod, and it should maintain a pod template that specifies it should create a new Pod's the number of copies of data to meet the standard. Then, ReplicaSet by creating and deleting Pod to achieve its purpose, in order to achieve the required number needed. When ReplicaSet need to create a new Pod, it uses its Pod template. 

ReplicaSet link its Pods Pods are by metadata.ownerReferences field. This field specifies the resource is currently owned objects. All Pod ReplicaSet ReplicaSet have acquired identification information in its possession at its ownerReferences field. Through this link, ReplicaSet Pod know the status of it is to maintain and plan accordingly. 

ReplicaSet using its identity selector to get a new Pod. If no OwnerReference Pod OwnerReference or not it matches with the controller and the selector ReplicaSet, it will immediately acquired by the ReplicaSet. 

When to use ReplicaSet 
ReplicaSet ensure pod copies running at any given time to a specified number. However, the deployment is a higher level concept, which manages and provides declarative ReplicaSet updates and many other useful features for the Pod. Therefore, unless you need a custom update or no update schedule, otherwise we recommend the use of deployment rather than directly using ReplicaSet. 

This actually means that you may never need to operate ReplicaSet objects: instead use Deployment, and define your application spec section.

  

DaemonSet

aemonSet guarantee runs a container copy on each Node, used to deploy some of the cluster log, monitor or other system management applications. Typical applications include: 
log collection, such fluentd, logstash other 
system monitoring, such as Prometheus Node Exporter, collectd, New Relic agent, Ganglia gmond other 
system program such as kube-proxy, kube-dns, glusterd, ceph etc.

  

 

Guess you like

Origin www.cnblogs.com/zy09/p/11250179.html