File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
content/zh-cn/docs/tasks/debug/debug-application Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -533,27 +533,22 @@ https://github.com/GoogleContainerTools/distroless).
533
533
534
534
You can use the `kubectl debug` command to add ephemeral containers to a
535
535
running Pod. First, create a pod for the example:
536
-
537
- ```shell
538
- kubectl run ephemeral-demo --image=registry.k8s.io/pause:3.1 --restart=Never
539
- ```
540
-
541
- The examples in this section use the `pause` container image because it does not
542
- contain debugging utilities, but this method works with all container
543
- images.
544
536
-->
545
537
## 使用临时容器来调试的例子 {#ephemeral-container-example}
546
538
547
539
你可以使用 ` kubectl debug ` 命令来给正在运行中的 Pod 增加一个临时容器。
548
540
首先,像示例一样创建一个 pod:
549
541
550
542
``` shell
551
- kubectl run ephemeral-demo --image=k8s.gcr .io/pause:3.1 --restart=Never
543
+ kubectl run ephemeral-demo --image=registry.k8s .io/pause:3.1 --restart=Never
552
544
```
553
545
554
- {{< note >}}
546
+ <!--
547
+ The examples in this section use the `pause` container image because it does not
548
+ contain debugging utilities, but this method works with all container
549
+ images.
550
+ -->
555
551
本节示例中使用 ` pause ` 容器镜像,因为它不包含调试程序,但是这个方法适用于所有容器镜像。
556
- {{< /note >}}
557
552
558
553
<!--
559
554
If you attempt to use `kubectl exec` to create a shell you will see an error
You can’t perform that action at this time.
0 commit comments