Inline some content for the HPA walkthrough, since the original files have been removed (#7414)
This commit is contained in:
@@ -29,8 +29,25 @@ See the [Horizontal Pod Autoscaler user guide](/docs/tasks/run-application/horiz
|
|||||||
## Step One: Run & expose php-apache server
|
## 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.
|
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).
|
The Dockerfile has the following content:
|
||||||
It defines an [index.php](/docs/user-guide/horizontal-pod-autoscaling/image/index.php) page which performs some CPU intensive computations.
|
|
||||||
|
```
|
||||||
|
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:
|
First, we will start a deployment running the image and expose it as a service:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user