Skip to content

Commit

Permalink
Fix of pull request #18960
Browse files Browse the repository at this point in the history
  • Loading branch information
kkanska committed Feb 4, 2020
1 parent e8b95d5 commit 81003ee
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ It defines an index.php page which performs some CPU intensive computations:
First, we will start a deployment running the image and expose it as a service:

```shell
kubectl run php-apache --image=k8s.gcr.io/hpa-example --requests=cpu=200m --limits=cpu=500m --expose --port=80 --generator=run-pod/v1
kubectl apply -f https://k8s.io/examples/application/php-apache.yaml
```
```
service/php-apache created
Expand Down
39 changes: 39 additions & 0 deletions content/en/examples/application/php-apache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: php-apache
spec:
selector:
matchLabels:
run: php-apache
replicas: 1
template:
metadata:
labels:
run: php-apache
spec:
containers:
- name: php-apache
image: k8s.gcr.io/hpa-example
ports:
- containerPort: 80
resources:
limits:
cpu: 500m
requests:
cpu: 200m

---

apiVersion: v1
kind: Service
metadata:
name: php-apache
labels:
run: php-apache
spec:
ports:
- port: 80
selector:
run: php-apache

0 comments on commit 81003ee

Please sign in to comment.