use replicas to replace kubectl scale deployment.
Signed-off-by: Weiping Cai <weiping.cai@daocloud.io>
This commit is contained in:
parent
cf3becadff
commit
0202db7c00
|
@ -41,7 +41,7 @@ kubectl create deployment --image=nginx nginx-app --port=80
|
|||
deployment.apps/nginx-app created
|
||||
```
|
||||
|
||||
```
|
||||
```shell
|
||||
# add env to nginx-app
|
||||
kubectl set env deployment/nginx-app DOMAIN=cluster
|
||||
```
|
||||
|
|
|
@ -190,11 +190,8 @@ This delete is asynchronous, so for a time you will see the namespace in the `Te
|
|||
|
||||
```shell
|
||||
kubectl create deployment snowflake --image=k8s.gcr.io/serve_hostname -n=development --replicas=2
|
||||
kubectl scale deployment snowflake --replicas=2 -n=development
|
||||
```
|
||||
We have just created a deployment whose replica size is 2 that is running the pod called `snowflake` with a basic container that just serves the hostname.
|
||||
Note that `kubectl run` creates deployments only on Kubernetes cluster >= v1.2. If you are running older versions, it creates replication controllers instead.
|
||||
If you want to obtain the old behavior, use `--generator=run/v1` to create replication controllers. See [`kubectl run`](/docs/reference/generated/kubectl/kubectl-commands/#run) for more details.
|
||||
|
||||
```shell
|
||||
kubectl get deployment -n=development
|
||||
|
|
Loading…
Reference in New Issue