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: modules/nodes-pods-autoscaling-about.adoc
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,11 +65,11 @@ and ensure that your application meets these requirements before using
65
65
memory-based autoscaling.
66
66
====
67
67
68
-
The following example shows autoscaling for the `image-registry` `DeploymentConfig` object. The initial deployment requires 3 pods. The HPA object increased that minimum to 5 and will increase the pods up to 7 if CPU usage on the pods reaches 75%:
68
+
The following example shows autoscaling for the `image-registry` `Deployment` object. The initial deployment requires 3 pods. The HPA object increases the minimum to 5. If CPU usage on the pods reaches 75%, the pods will increase to 7:
= Creating a horizontal pod autoscaler for CPU utilization by using the CLI
8
7
9
-
You can create a horizontal pod autoscaler (HPA) for an existing `Deployment`, `DeploymentConfig`, `ReplicaSet`, `ReplicationController`, or `StatefulSet` object that automatically scales the pods associated with that object to maintain the CPU usage you specify.
8
+
Using the {product-title} CLI, you can create a horizontal pod autoscaler (HPA) to automatically scale an existing `Deployment`, `DeploymentConfig`, `ReplicaSet`, `ReplicationController`, or `StatefulSet` object. The HPA scales the pods associated with that object to maintain the CPU usage you specify.
9
+
10
+
[NOTE]
11
+
====
12
+
It is recommended to use a `Deployment` object or `ReplicaSet` object unless you need a specific feature or behavior provided by other objects.
13
+
====
10
14
11
15
The HPA increases and decreases the number of replicas between the minimum and maximum numbers to maintain the specified CPU utilization across all pods.
12
16
13
17
When autoscaling for CPU utilization, you can use the `oc autoscale` command and specify the minimum and maximum number of pods you want to run at any given time and the average CPU utilization your pods should target. If you do not specify a minimum, the pods are given default values from the {product-title} server.
18
+
14
19
To autoscale for a specific CPU value, create a `HorizontalPodAutoscaler` object with the target CPU and pod limits.
<3> Specify the maximum number of replicas when scaling up.
71
76
<4> Specify the target average CPU utilization over all the pods, represented as a percent of requested CPU. If not specified or negative, a default autoscaling policy is used.
72
77
+
73
-
For example, the following command shows autoscaling for the `image-registry` `DeploymentConfig` object. The initial deployment requires 3 pods. The HPA object increased that minimum to 5 and will increase the pods up to 7 if CPU usage on the pods reaches 75%:
78
+
For example, the following command shows autoscaling for the `image-registry` `Deployment` object. The initial deployment requires 3 pods. The HPA object increases the minimum to 5. If CPU usage on the pods reaches 75%, the pods will increase to 7:
** To scale for a specific CPU value, create a YAML file similar to the following for an existing object:
@@ -91,7 +96,7 @@ metadata:
91
96
spec:
92
97
scaleTargetRef:
93
98
apiVersion: v1 <3>
94
-
kind: ReplicaSet <4>
99
+
kind: Deployment <4>
95
100
name: example <5>
96
101
minReplicas: 1 <6>
97
102
maxReplicas: 10 <7>
@@ -106,9 +111,9 @@ spec:
106
111
<1> Use the `autoscaling/v2beta2` API.
107
112
<2> Specify a name for this horizontal pod autoscaler object.
108
113
<3> Specify the API version of the object to scale:
114
+
* For a `Deployment`, `ReplicaSet`, `Statefulset` object, use `apps/v1`.
109
115
* For a `ReplicationController`, use `v1`.
110
116
* For a `DeploymentConfig`, use `apps.openshift.io/v1`.
111
-
* For a `Deployment`, `ReplicaSet`, `Statefulset` object, use `apps/v1`.
112
117
<4> Specify the type of object. The object must be a `Deployment`, `DeploymentConfig`/`dc`, `ReplicaSet`/`rs`, `ReplicationController`/`rc`, or `StatefulSet`.
113
118
<5> Specify the name of the object to scale. The object must exist.
114
119
<6> Specify the minimum number of replicas when scaling down.
@@ -135,7 +140,7 @@ $ oc get hpa cpu-autoscale
135
140
.Example output
136
141
[source,terminal]
137
142
----
138
-
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
Copy file name to clipboardExpand all lines: modules/nodes-pods-autoscaling-creating-memory.adoc
+33-24Lines changed: 33 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,15 @@
6
6
7
7
= Creating a horizontal pod autoscaler object for memory utilization by using the CLI
8
8
9
-
You can create a horizontal pod autoscaler (HPA) for an existing `DeploymentConfig` object or `ReplicationController` object
10
-
that automatically scales the pods associated with that object to maintain the average memory utilization you specify,
11
-
either a direct value or a percentage of requested memory.
9
+
Using the {product-title} CLI, you can create a horizontal pod autoscaler (HPA) to automatically scale an existing
10
+
`Deployment`, `DeploymentConfig`, `ReplicaSet`, `ReplicationController`, or `StatefulSet` object. The HPA
11
+
scales the pods associated with that object to maintain the average memory utilization you specify, either a direct value or a percentage
12
+
of requested memory.
13
+
14
+
[NOTE]
15
+
====
16
+
It is recommended to use a `Deployment` object or `ReplicaSet` object unless you need a specific feature or behavior provided by other objects.
17
+
====
12
18
13
19
The HPA increases and decreases the number of replicas between the minimum and maximum numbers to maintain
14
20
the specified memory utilization across all pods.
@@ -36,13 +42,14 @@ Labels: <none>
36
42
Annotations: <none>
37
43
API Version: metrics.k8s.io/v1beta1
38
44
Containers:
39
-
Name: scheduler
40
-
Usage:
41
-
Cpu: 2m
42
-
Memory: 41056Ki
43
-
Name: wait-for-host-port
45
+
Name: wait-for-host-port
44
46
Usage:
47
+
Cpu: 0
45
48
Memory: 0
49
+
Name: scheduler
50
+
Usage:
51
+
Cpu: 8m
52
+
Memory: 45440Ki
46
53
Kind: PodMetrics
47
54
Metadata:
48
55
Creation Timestamp: 2020-02-14T22:21:14Z
@@ -58,9 +65,8 @@ To create a horizontal pod autoscaler for memory utilization:
58
65
59
66
. Create a YAML file for one of the following:
60
67
61
-
** To scale for a specific memory value, create a `HorizontalPodAutoscaler` object similar to the following for an existing `ReplicationController` object or replication controller:
68
+
** To scale for a specific memory value, create a `HorizontalPodAutoscaler` object similar to the following for an existing object:
62
69
+
63
-
.Example output
64
70
[source,yaml,options="nowrap"]
65
71
----
66
72
apiVersion: autoscaling/v2beta2 <1>
@@ -71,7 +77,7 @@ metadata:
71
77
spec:
72
78
scaleTargetRef:
73
79
apiVersion: v1 <3>
74
-
kind: ReplicationController <4>
80
+
kind: Deployment <4>
75
81
name: example <5>
76
82
minReplicas: 1 <6>
77
83
maxReplicas: 10 <7>
@@ -97,9 +103,11 @@ spec:
97
103
<1> Use the `autoscaling/v2beta2` API.
98
104
<2> Specify a name for this horizontal pod autoscaler object.
99
105
<3> Specify the API version of the object to scale:
100
-
* For a replication controller, use `v1`,
101
-
* For a `DeploymentConfig` object, use `apps.openshift.io/v1`.
102
-
<4> Specify the kind of object to scale, either `ReplicationController` or `DeploymentConfig`.
106
+
* For a `Deployment`, `ReplicaSet`, or `Statefulset` object, use `apps/v1`.
107
+
* For a `ReplicationController`, use `v1`.
108
+
* For a `DeploymentConfig`, use `apps.openshift.io/v1`.
109
+
<4> Specify the type of object. The object must be a `Deployment`, `DeploymentConfig`,
110
+
`ReplicaSet`, `ReplicationController`, or `StatefulSet`.
103
111
<5> Specify the name of the object to scale. The object must exist.
104
112
<6> Specify the minimum number of replicas when scaling down.
105
113
<7> Specify the maximum number of replicas when scaling up.
@@ -109,9 +117,8 @@ spec:
109
117
<11> Specify `averageValue` and a specific memory value.
110
118
<12> Optional: Specify a scaling policy to control the rate of scaling up or down.
111
119
112
-
** To scale for a percentage, create a `HorizontalPodAutoscaler` object similar to the following:
120
+
** To scale for a percentage, create a `HorizontalPodAutoscaler` object similar to the following for an existing object:
113
121
+
114
-
.Example output
115
122
[source,yaml,options="nowrap"]
116
123
----
117
124
apiVersion: autoscaling/v2beta2 <1>
@@ -122,12 +129,12 @@ metadata:
122
129
spec:
123
130
scaleTargetRef:
124
131
apiVersion: apps.openshift.io/v1 <3>
125
-
kind: DeploymentConfig <4>
132
+
kind: Deployment <4>
126
133
name: example <5>
127
134
minReplicas: 1 <6>
128
135
maxReplicas: 10 <7>
129
136
metrics: <8>
130
-
- type: Resource
137
+
- type: Deployment
131
138
resource:
132
139
name: memory <9>
133
140
target:
@@ -148,9 +155,11 @@ spec:
148
155
<1> Use the `autoscaling/v2beta2` API.
149
156
<2> Specify a name for this horizontal pod autoscaler object.
150
157
<3> Specify the API version of the object to scale:
151
-
* For a replication controller, use `v1`,
152
-
* For a `DeploymentConfig` object, use `apps.openshift.io/v1`.
153
-
<4> Specify the kind of object to scale, either `ReplicationController` or `DeploymentConfig`.
158
+
* For a ReplicationController, use `v1`.
159
+
* For a DeploymentConfig, use `apps.openshift.io/v1`.
160
+
* For a Deployment, ReplicaSet, Statefulset object, use `apps/v1`.
161
+
<4> Specify the type of object. The object must be a `Deployment`, `DeploymentConfig`,
162
+
`ReplicaSet`, `ReplicationController`, or `StatefulSet`.
154
163
<5> Specify the name of the object to scale. The object must exist.
155
164
<6> Specify the minimum number of replicas when scaling down.
156
165
<7> Specify the maximum number of replicas when scaling up.
@@ -191,8 +200,8 @@ $ oc get hpa hpa-resource-metrics-memory
191
200
.Example output
192
201
[source,terminal]
193
202
----
194
-
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
= Creating a horizontal pod autoscaler by using the web console
7
7
8
-
From the web console, you can create a horizontal pod autoscaler (HPA) that specifies the minimum and maximum number of pods you want to run on a deployment. You can also define the amount of CPU or memory usage that your pods should target..
8
+
From the web console, you can create a horizontal pod autoscaler (HPA) that specifies the minimum and maximum number of pods you want to run on a `Deployment` or `DeploymentConfig` object. You can also define the amount of CPU or memory usage that your pods should target.
Copy file name to clipboardExpand all lines: modules/security-context-constraints-about.adoc
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,12 @@ CRI-O has the following default list of capabilities that are allowed for each c
166
166
* `NET_BIND_SERVICE`
167
167
* `KILL`
168
168
169
-
The containers use the capabilities from this default list, but pod manifest authors can alter it by requesting additional capabilities or removing some of the default behaviors. Use the `allowedCapabilities`, `defaultAddCapabilities`, and `requiredDropCapabilities` parameters to control such requests from the pods and to dictate which capabilities can be requested, which ones must be added to each container, and which ones must be forbidden.
169
+
The containers use the capabilities from this default list, but pod manifest authors can alter the list by requesting additional capabilities or removing some of the default behaviors. Use the `allowedCapabilities`, `defaultAddCapabilities`, and `requiredDropCapabilities` parameters to control such requests from the pods and to specify which capabilities can be requested, which ones must be added to each container, and which ones must be forbidden, or dropped, from each container.
170
+
171
+
[NOTE]
172
+
====
173
+
You can drop all capabilites from containers by setting the `requiredDropCapabilities` parameter to `ALL`.
Copy file name to clipboardExpand all lines: modules/security-context-constraints-creating.adoc
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,10 +38,10 @@ groups:
38
38
- my-admin-group
39
39
----
40
40
+
41
-
Optionally, you can specify drop capabilities for an SCC by setting the
41
+
Optionally, you can drop specific capabilities for an SCC by setting the
42
42
`requiredDropCapabilities` field with the desired values. Any specified
43
-
capabilities are dropped from the container. For example, to create an SCC
44
-
with the `KILL`, `MKNOD`, and `SYS_CHROOT` required drop capabilities, add
43
+
capabilities are dropped from the container. To drop all capabilities, specify `ALL`. For example, to create an SCC
44
+
that drops the `KILL`, `MKNOD`, and `SYS_CHROOT` capabilities, add
45
45
the following to the SCC object:
46
46
+
47
47
[source,yaml]
@@ -52,6 +52,12 @@ requiredDropCapabilities:
52
52
- SYS_CHROOT
53
53
----
54
54
+
55
+
[NOTE]
56
+
+
57
+
====
58
+
You cannot list a capability in both `allowedCapabilities` and `requiredDropCapabilities`.
59
+
====
60
+
+
55
61
CRI-O supports the same list of capability values that are found in the link:https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities[Docker documentation].
Copy file name to clipboardExpand all lines: nodes/pods/nodes-pods-autoscaling.adoc
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,14 @@ As a developer, you can use a horizontal pod autoscaler (HPA) to
9
9
specify how {product-title} should automatically increase or decrease the scale of
10
10
a replication controller or deployment configuration, based on metrics collected
11
11
from the pods that belong to that replication controller or deployment
12
-
configuration.
13
-
12
+
configuration. You can create an HPA for any `Deployment`, `DeploymentConfig`,
13
+
`ReplicaSet`, `ReplicationController`, or `StatefulSet` object.
14
+
15
+
[NOTE]
16
+
====
17
+
It is recommended to use a `Deployment` object or `ReplicaSet` object unless you need a specific feature or behavior provided by other objects. For more information on
18
+
these objects, see xref:../../applications/deployments/what-deployments-are.adoc#what-deployments-are[Understanding Deployment and DeploymentConfig objects].
19
+
====
14
20
15
21
// The following include statements pull in the module files that comprise
16
22
// the assembly. Include any combination of concept, procedure, or reference
0 commit comments