Skip to content

Commit 56da2b6

Browse files
authored
Merge pull request #87829 from mburke5678/nodes-autoscaling-example
OSDOCS:12999 Misleading Example of Autoscaling for Image-Registry Deployment
2 parents 7ce0b50 + b5207e0 commit 56da2b6

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

modules/nodes-pods-autoscaling-about.adoc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,52 +66,52 @@ and ensure that your application meets these requirements before using
6666
memory-based autoscaling.
6767
====
6868

69-
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 increase to 7:
69+
The following example shows autoscaling for the `hello-node` `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 increase to 7:
7070

7171
[source,terminal]
7272
----
73-
$ oc autoscale deployment/image-registry --min=5 --max=7 --cpu-percent=75
73+
$ oc autoscale deployment/hello-node --min=5 --max=7 --cpu-percent=75
7474
----
7575

7676
.Example output
7777
[source,terminal]
7878
----
79-
horizontalpodautoscaler.autoscaling/image-registry autoscaled
79+
horizontalpodautoscaler.autoscaling/hello-node autoscaled
8080
----
8181

82-
.Sample HPA for the `image-registry` `Deployment` object with `minReplicas` set to 3
82+
.Sample YAML to create an HPA for the `hello-node` deployment object with `minReplicas` set to 3
8383
[source,yaml]
8484
----
8585
apiVersion: autoscaling/v1
8686
kind: HorizontalPodAutoscaler
8787
metadata:
88-
name: image-registry
88+
name: hello-node
8989
namespace: default
9090
spec:
9191
maxReplicas: 7
9292
minReplicas: 3
9393
scaleTargetRef:
9494
apiVersion: apps/v1
9595
kind: Deployment
96-
name: image-registry
96+
name: hello-node
9797
targetCPUUtilizationPercentage: 75
9898
status:
9999
currentReplicas: 5
100100
desiredReplicas: 0
101101
----
102102

103-
. View the new state of the deployment:
104-
+
103+
After you create the HPA, you can view the new state of the deployment by running the following command:
104+
105105
[source,terminal]
106106
----
107-
$ oc get deployment image-registry
107+
$ oc get deployment hello-node
108108
----
109-
+
109+
110110
There are now 5 pods in the deployment:
111-
+
111+
112112
.Example output
113113
[source,terminal]
114114
----
115-
NAME REVISION DESIRED CURRENT TRIGGERED BY
116-
image-registry 1 5 5 config
115+
NAME REVISION DESIRED CURRENT TRIGGERED BY
116+
hello-node 1 5 5 config
117117
----

modules/nodes-pods-autoscaling-creating-cpu.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ $ oc autoscale <object_type>/<name> \// <1>
7676
<3> Specify the maximum number of replicas when scaling up.
7777
<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.
7878
+
79-
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:
79+
For example, the following command shows autoscaling for the `hello-node` 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:
8080
+
8181
[source,terminal]
8282
----
83-
$ oc autoscale deployment/image-registry --min=5 --max=7 --cpu-percent=75
83+
$ oc autoscale deployment/hello-node --min=5 --max=7 --cpu-percent=75
8484
----
8585

8686
** To scale for a specific CPU value, create a YAML file similar to the following for an existing object:

0 commit comments

Comments
 (0)