You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -67,7 +66,7 @@ deployment.apps/nginx-app created
67
66
```
68
67
69
68
```shell
70
-
#add env to nginx-app
69
+
#添加 env 到 nginx-app
71
70
kubectl set env deployment/nginx-app DOMAIN=cluster
72
71
```
73
72
```
@@ -99,9 +98,9 @@ service "nginx-http" exposed
99
98
By using kubectl, you can create a [Deployment](/docs/concepts/workloads/controllers/deployment/) to ensure that N pods are running nginx, where N is the number of replicas stated in the spec and defaults to 1. You can also create a [service](/docs/concepts/services-networking/service/) with a selector that matches the pod labels. For more information, see [Use a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster).
By default images run in the background, similar to `docker run -d ...`. To run things in the foreground, use [`kubectl run`](/docs/reference/generated/kubectl/kubectl-commands/#run) to create pod:
Unlike `docker run ...`, if you specify `--attach`, then you attach `stdin`, `stdout` and `stderr`. You cannot control which streams are attached (`docker -a ...`).
118
117
To detach from the container, you can type the escape sequence Ctrl+P followed by Ctrl+Q.
119
118
-->
120
-
与 `docker run ...` 不同的是,如果指定了 `--attach`,我们将连接到 `stdin`,`stdout` 和 `stderr`,
119
+
与 `docker run ...` 不同的是,如果指定了 `--attach`,我们将连接到 `stdin`、`stdout` 和 `stderr`,
121
120
而不能控制具体连接到哪个输出流(`docker -a ...`)。要从容器中退出,可以输入 Ctrl + P,然后按 Ctrl + Q。
122
121
123
122
<!--
@@ -137,8 +136,8 @@ To list what is currently running, see [kubectl get](/docs/reference/generated/k
137
136
138
137
<!--
139
138
docker:
140
-
-->
141
-
使用 docker 命令:
139
+
-->
140
+
使用 Docker 命令:
142
141
143
142
```shell
144
143
docker ps -a
@@ -174,7 +173,7 @@ To attach a process that is already running in a container, see [kubectl attach]
174
173
<!--
175
174
docker:
176
175
-->
177
-
使用 docker 命令:
176
+
使用 Docker 命令:
178
177
179
178
```shell
180
179
docker ps
@@ -219,7 +218,7 @@ To execute a command in a container, see [kubectl exec](/docs/reference/generate
219
218
<!--
220
219
docker:
221
220
-->
222
-
使用 docker 命令:
221
+
使用 Docker 命令:
223
222
224
223
```shell
225
224
docker ps
@@ -263,7 +262,7 @@ To use interactive commands.
263
262
<!--
264
263
docker:
265
264
-->
266
-
使用 docker 命令:
265
+
使用 Docker 命令:
267
266
268
267
```shell
269
268
docker exec -ti 55c103fa1296 /bin/sh
@@ -289,11 +288,10 @@ To follow stdout/stderr of a process that is running, see [kubectl logs](/docs/r
0 commit comments