Kubernetes relationship with the deployment in ReplicationController

ReplicationController

After Replication Controller is a core element of Kubernetes, and application hosting to Kubernetes, need to ensure that the application can continue to run, Replication Controller is the assurance of key, key functions are as follows:

  • Ensure that the number pod: it will ensure that there is a specified number of Kubernetes Pod running. If less than the specified number of pod, Replication Controller creates a new, otherwise it will be deleted to ensure that the number of excess Pod unchanged.
  • Ensure pod Health: When the pod unhealthy, run error or inability to provide services, Replication Controller also kill unhealthy pod, re-create new ones.
  • Elastically stretchable: during peak or off-peak time, you can improve resource utilization by adjusting the number of pod Replication Controller dynamic. At the same time, configure the monitoring functions (Hroizontal Pod Autoscaler), will automatically obtain the overall timing of the associated resource Replication Controller pod from usage monitoring platform, so that the automatic retractable.
  • Rolling upgrade: a rolling upgrade is a smooth upgrade path, through the gradual replacement of the strategy to ensure the stability of the whole system, you can discover and solve problems when initializing the upgrade, to avoid problems expanding.

Deployment

Deployment is also a core Kubernetes's main responsibility is to ensure that the same number of pod and health, 90% of the functionality Replication Controller exactly the same, can be seen as a new generation of Replication Controller. However, it has the new feature outside Replication Controller:

  • Replication Controller All functions: Deployment Replication Controller inherits all of the functions described above.

  • Events and status View: You can view detailed upgrade Deployment of the progress and status.

  • Rollback: When upgrading pod mirroring or find problems related parameters, you can use rollback to roll back to a stable version or the specified version.

  • Version history: every operation of Deployment, can be preserved, given the subsequent rollback may be used.

  • Pause and Start: For each upgrade, you can pause at any time and start.

  • A variety of upgrade options: Recreate: Deletes all existing pod, re-create new; RollingUpdate: rolling upgrade, and gradually replace the strategy, while at the same time rolling upgrade to support more additional parameters, such as setting the maximum number is not available with the pod, minimum upgrade interval and so on.

Published 33 original articles · won praise 0 · Views 3946

Guess you like

Origin blog.csdn.net/erhaiou2008/article/details/103428966