Skip to content

Commit 251d746

Browse files
cimomok8s-ci-robot
authored andcommitted
Inline some content for the HPA walkthrough, since the original files have been removed (#7414)
1 parent e4ab69b commit 251d746

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,25 @@ See the [Horizontal Pod Autoscaler user guide](/docs/tasks/run-application/horiz
2929
## Step One: Run & expose php-apache server
3030

3131
To demonstrate Horizontal Pod Autoscaler we will use a custom docker image based on the php-apache image.
32-
The Dockerfile can be found [here](/docs/user-guide/horizontal-pod-autoscaling/image/Dockerfile).
33-
It defines an [index.php](/docs/user-guide/horizontal-pod-autoscaling/image/index.php) page which performs some CPU intensive computations.
32+
The Dockerfile has the following content:
33+
34+
```
35+
FROM php:5-apache
36+
ADD index.php /var/www/html/index.php
37+
RUN chmod a+rx index.php
38+
```
39+
40+
It defines an index.php page which performs some CPU intensive computations:
41+
42+
```
43+
<?php
44+
$x = 0.0001;
45+
for ($i = 0; $i <= 1000000; $i++) {
46+
$x += sqrt($x);
47+
}
48+
echo "OK!";
49+
?>
50+
```
3451

3552
First, we will start a deployment running the image and expose it as a service:
3653

0 commit comments

Comments
 (0)