Inline some content for the HPA walkthrough, since the original files have been removed (#7414)

reviewable/pr7416/r1
Kai Chen 2018-02-14 14:57:50 -08:00 committed by k8s-ci-robot
parent e4ab69bdcb
commit 251d746c6e
1 changed files with 19 additions and 2 deletions

View File

@ -29,8 +29,25 @@ See the [Horizontal Pod Autoscaler user guide](/docs/tasks/run-application/horiz
## Step One: Run & expose php-apache server
To demonstrate Horizontal Pod Autoscaler we will use a custom docker image based on the php-apache image.
The Dockerfile can be found [here](/docs/user-guide/horizontal-pod-autoscaling/image/Dockerfile).
It defines an [index.php](/docs/user-guide/horizontal-pod-autoscaling/image/index.php) page which performs some CPU intensive computations.
The Dockerfile has the following content:
```
FROM php:5-apache
ADD index.php /var/www/html/index.php
RUN chmod a+rx index.php
```
It defines an index.php page which performs some CPU intensive computations:
```
<?php
$x = 0.0001;
for ($i = 0; $i <= 1000000; $i++) {
$x += sqrt($x);
}
echo "OK!";
?>
```
First, we will start a deployment running the image and expose it as a service: