官术网_书友最值得收藏!

Replication controllers and replica sets

Replication controllers have been deprecated in favor of using Deployments, which configure ReplicaSets. This method is a more robust manner of application replication, and has been developed as a response to the feedback of the container running community. We'll explore Deployments, Jobs, ReplicaSets, DaemonSets, and StatefulSets further in Chapter 4Implementing Reliable Container-Native Applications. The following information is left here for reference.

Replication controllers (RCs), as the name suggests, manage the number of nodes that a pod and included container images run on. They ensure that an instance of an image is being run with the specific number of copies. RCs ensure that a pod or many same pods are always up and available to serve application traffic.

As you start to operationalize your containers and pods, you'll need a way to roll out updates, scale the number of copies running (both up and down), or simply ensure that at least one instance of your stack is always running. RCs create a high-level mechanism to make sure that things are operating correctly across the entire application and cluster. Pods created by RCs are replaced if they fail, and are deleted when terminated. RCs are recommended for use even if you only have a single pod in your application.

RCs are simply charged with ensuring that you have the desired scale for your application. You define the number of pod replicas you want running and give it a template for how to create new pods. Just like services, we'll use selectors and labels to define a pod's membership in an RC.

Kubernetes doesn't require the strict behavior of the replication controller, which is ideal for long-running processes. In fact, job controllers can be used for short-lived workloads, which allow jobs to be run to a completion state and are well suited for batch work.

Replica sets are a new type, currently in beta, that represent an improved version of replication controllers. Currently, the main difference consists of being able to use the new set-based label selectors, as we will see in the following examples.

主站蜘蛛池模板: 黄陵县| 会宁县| 娄烦县| 嘉兴市| 武胜县| 托克托县| 冕宁县| 台州市| 城口县| 潞城市| 瑞安市| 浏阳市| 连州市| 富川| 浙江省| 青海省| 永城市| 罗江县| 五峰| 台北县| 合肥市| 烟台市| 云梦县| 清镇市| 区。| 呼图壁县| 蓬安县| 大悟县| 杨浦区| 汾西县| 宽甸| 旺苍县| 祁连县| 台山市| 图木舒克市| 水城县| 永新县| 汾阳市| 彭州市| 牡丹江市| 临夏市|