From e85fabe3edc6f665b1e74214a496350a3c771dbe Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Mon, 14 Sep 2020 19:59:45 +1000 Subject: [PATCH 1/2] Update horizontal-pod-autoscale-walkthrough.md As per the error described in https://github.com/LevelUpEducation/kubernetes-demo/issues/31, guidance was to add the generator explicitly: `kubectl run --generator=run-pod/v1 -i --tty load-generator --image=busybox /bin/sh` But I prefer the example from the run docs https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_run/: `kubectl run -i --tty busybox --image=busybox --restart=Never` --- .../run-application/horizontal-pod-autoscale-walkthrough.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md index 2c00e4aa7b..dabebdb4fd 100644 --- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md +++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md @@ -114,7 +114,7 @@ Now, we will see how the autoscaler reacts to increased load. We will start a container, and send an infinite loop of queries to the php-apache service (please run it in a different terminal): ```shell -kubectl run -it --rm load-generator --image=busybox /bin/sh +kubectl run -i --tty busybox --image=busybox --restart=Never Hit enter for command prompt From c3e87ab296d5a8a2dec065497d00042a0deddbe7 Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Tue, 13 Oct 2020 12:51:26 +1100 Subject: [PATCH 2/2] Update horizontal-pod-autoscale-walkthrough.md --- .../run-application/horizontal-pod-autoscale-walkthrough.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md index dabebdb4fd..1457ab0e16 100644 --- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md +++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md @@ -114,11 +114,7 @@ Now, we will see how the autoscaler reacts to increased load. We will start a container, and send an infinite loop of queries to the php-apache service (please run it in a different terminal): ```shell -kubectl run -i --tty busybox --image=busybox --restart=Never - -Hit enter for command prompt - -while true; do wget -q -O- http://php-apache; done +kubectl run -i --tty load-generator --rm --image=busybox --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://php-apache; done" ``` Within a minute or so, we should see the higher CPU load by executing: