Support setting env vars in kubectl run

This commit is contained in:
feihujiang
2015-09-01 11:03:29 +08:00
parent bb3e20e361
commit 84e94e39cd
8 changed files with 198 additions and 5 deletions

View File

@@ -58,7 +58,7 @@ How do I run an nginx container and expose it to the world? Checkout [kubectl ru
With docker:
```console
$ docker run -d --restart=always --name nginx-app -p 80:80 nginx
$ docker run -d --restart=always -e DOMAIN=cluster --name nginx-app -p 80:80 nginx
a9ec34d9878748d2f33dc20cb25c714ff21da8d40558b45bfaec9955859075d0
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
@@ -69,7 +69,7 @@ With kubectl:
```console
# start the pod running nginx
$ kubectl run --image=nginx nginx-app
$ kubectl run --image=nginx nginx-app --port=80 --env="DOMAIN=local"
CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS
nginx-app nginx-app nginx run=nginx-app 1
# expose a port through with a service