File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
docs/tasks/run-application Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff 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
3131To 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
3552First, we will start a deployment running the image and expose it as a service:
3653
You can’t perform that action at this time.
0 commit comments