You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: applications/deployments/what-deployments-are.adoc
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,12 @@ toc::[]
8
8
9
9
The `Deployment` and `DeploymentConfig` API objects in {product-title} provide two similar but different methods for fine-grained management over common user applications. They are composed of the following separate API objects:
10
10
11
-
* A `DeploymentConfig` or `Deployment` object, either of which describes the desired state of a particular component of the application as a pod template.
12
-
* `DeploymentConfig` objects involve one or more _replication controllers_, which contain a point-in-time record of the state of a deployment as a pod template. Similarly, `Deployment` objects involve one or more _replica sets_, a successor of replication controllers.
11
+
* A `Deployment` or `DeploymentConfig` object, either of which describes the desired state of a particular component of the application as a pod template.
12
+
* `Deployment` objects involve one or more _replica sets_, which contain a point-in-time record of the state of a deployment as a pod template. Similarly, `DeploymentConfig` objects involve one or more _replication controllers_, which preceded replica sets.
13
13
* One or more pods, which represent an instance of a particular version of an application.
14
14
15
+
Use `Deployment` objects unless you need a specific feature or behavior provided by `DeploymentConfig` objects.
Deployments and deployment configs are enabled by the use of native Kubernetes API objects `ReplicaSet` and `ReplicationController`, respectively, as their building blocks.
33
35
34
-
Users do not have to manipulate replication controllers, replica sets, or pods owned by `DeploymentConfig` objects or deployments. The deployment systems ensure changes are propagated appropriately.
36
+
Users do not have to manipulate replica sets, replication controllers, or pods owned by `Deployment` or `DeploymentConfig` objects. The deployment systems ensure changes are propagated appropriately.
35
37
36
38
[TIP]
37
39
====
@@ -40,11 +42,12 @@ If the existing deployment strategies are not suited for your use case and you m
40
42
41
43
The following sections provide further details on these objects.
Copy file name to clipboardExpand all lines: modules/deployments-comparing-deploymentconfigs.adoc
+23-24Lines changed: 23 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,28 @@ For `DeploymentConfig` objects, if a node running a deployer pod goes down, it w
18
18
19
19
However, deployment rollouts are driven from a controller manager. The controller manager runs in high availability mode on masters and uses leader election algorithms to value availability over consistency. During a failure it is possible for other masters to act on the same deployment at the same time, but this issue will be reconciled shortly after the failure occurs.
20
20
21
+
[id="delpoyments-specific-features_{context}"]
22
+
== Deployment-specific features
23
+
24
+
[discrete]
25
+
==== Rollover
26
+
27
+
The deployment process for `Deployment` objects is driven by a controller loop, in contrast to `DeploymentConfig` objects that use deployer pods for every new rollout. This means that the `Deployment` object can have as many active replica sets as possible, and eventually the deployment controller will scale down all old replica sets and scale up the newest one.
28
+
29
+
`DeploymentConfig` objects can have at most one deployer pod running, otherwise multiple deployers might conflict when trying to scale up what they think should be the newest replication controller. Because of this, only two replication controllers can be active at any point in time. Ultimately, this results in faster rapid rollouts for `Deployment` objects.
30
+
31
+
[discrete]
32
+
==== Proportional scaling
33
+
34
+
Because the deployment controller is the sole source of truth for the sizes of new and old replica sets owned by a `Deployment` object, it can scale ongoing rollouts. Additional replicas are distributed proportionally based on the size of each replica set.
35
+
36
+
`DeploymentConfig` objects cannot be scaled when a rollout is ongoing because the controller will have issues with the deployer process about the size of the new replication controller.
37
+
38
+
[discrete]
39
+
==== Pausing mid-rollout
40
+
41
+
Deployments can be paused at any point in time, meaning you can also pause ongoing rollouts. However, you currently cannot pause deployer pods; if you try to pause a deployment in the middle of a rollout, the deployer process is not affected and continues until it finishes.
@@ -45,27 +67,4 @@ Deployments do not yet support any lifecycle hooks.
45
67
[discrete]
46
68
==== Custom strategies
47
69
48
-
Deployments do not support user-specified custom deployment strategies yet.
49
-
50
-
[id="delpoyments-specific-features_{context}"]
51
-
== Deployment-specific features
52
-
53
-
[discrete]
54
-
==== Rollover
55
-
56
-
The deployment process for `Deployment` objects is driven by a controller loop, in contrast to `DeploymentConfig` objects which use deployer pods for every new rollout. This means that the `Deployment` object can have as many active replica sets as possible, and eventually the deployment controller will scale down all old replica sets and scale up the newest one.
57
-
58
-
`DeploymentConfig` objects can have at most one deployer pod running, otherwise multiple deployers end up conflicting while trying to scale up what they think should be the newest replication controller. Because of this, only two replication controllers can be active at any point in time. Ultimately, this translates to faster rapid rollouts for `Deployment` objects.
59
-
60
-
[discrete]
61
-
==== Proportional scaling
62
-
63
-
Because the deployment controller is the sole source of truth for the sizes of new and old replica sets owned by a `Deployment` object, it is able to scale ongoing rollouts. Additional replicas are distributed proportionally based on the size of each replica set.
64
-
65
-
`DeploymentConfig` objects cannot be scaled when a rollout is ongoing because the controller will end up having issues with the deployer process about the size of the new replication controller.
66
-
67
-
[discrete]
68
-
==== Pausing mid-rollout
69
-
70
-
Deployments can be paused at any point in time, meaning you can also pause ongoing rollouts. On the other hand, you cannot pause deployer pods
71
-
currently, so if you try to pause a deployment in the middle of a rollout, the deployer process will not be affected and will continue until it finishes.
70
+
Deployments do not support user-specified custom deployment strategies.
Copy file name to clipboardExpand all lines: modules/deployments-kube-deployments.adoc
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,7 @@
5
5
[id="deployments-kube-deployments_{context}"]
6
6
= Deployments
7
7
8
-
Kubernetes provides a first-class, native API object type in {product-title} called `Deployment`. `Deployment` objects serve as a descendant of the {product-title}-specific `DeploymentConfig` object.
9
-
10
-
Like `DeploymentConfig` objects, `Deployment` objects describe the desired state of a particular component of an application as a pod template. Deployments create replica sets, which orchestrate pod lifecycles.
8
+
Kubernetes provides a first-class, native API object type in {product-title} called `Deployment`. `Deployment` objects describe the desired state of a particular component of an application as a pod template. Deployments create replica sets, which orchestrate pod lifecycles.
11
9
12
10
For example, the following deployment definition creates a replica set to bring up one `hello-openshift` pod:
Copy file name to clipboardExpand all lines: modules/deployments-replicasets.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
[id="deployments-repliasets_{context}"]
6
6
= Replica sets
7
7
8
-
Similar to a replication controller, a `ReplicaSet` is a native Kubernetes API object that ensures a specified number of pod replicas are running at any given time. The difference between a replica set and a replication controller is that a replica set supports set-based selector requirements whereas a replication controller only supports equality-based selector requirements.
8
+
A `ReplicaSet` is a native Kubernetes API object that ensures a specified number of pod replicas are running at any given time.
A replication controller ensures that a specified number of replicas of a pod are running at all times. If pods exit or are deleted, the replication controller acts to instantiate more up to the defined number. Likewise, if there are more running than desired, it deletes as many as necessary to match the defined amount.
8
+
Similar to a replica set, a replication controller ensures that a specified number of replicas of a pod are running at all times. If pods exit or are deleted, the replication controller instantiates more up to the defined number. Likewise, if there are more running than desired, it deletes as many as necessary to match the defined amount. The difference between a replica set and a replication controller is that a replica set supports set-based selector requirements whereas a replication controller only supports equality-based selector requirements.
9
9
10
10
A replication controller configuration consists of:
11
11
@@ -18,6 +18,13 @@ A selector is a set of labels assigned to the pods that are managed by the repli
18
18
The replication controller does not perform auto-scaling based on load or traffic, as it does not track either. Rather, this requires its replica
19
19
count to be adjusted by an external auto-scaler.
20
20
21
+
[NOTE]
22
+
====
23
+
Use a `DeploymentConfig` to create a replication controller instead of creating replication controllers directly.
24
+
25
+
If you require custom orchestration or do not require updates, use replica sets instead of replication controllers.
26
+
====
27
+
21
28
The following is an example definition of a replication controller:
0 commit comments