Skip to content

Commit 9077630

Browse files
authored
Merge pull request #39419 from mengjiao-liu/resync-debug-running-pod-zh
[zh-cn] Resync debug-running-pod.md
2 parents 83a003b + 828cba8 commit 9077630

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

content/zh-cn/docs/tasks/debug/debug-application/debug-running-pod.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -533,27 +533,22 @@ https://github.com/GoogleContainerTools/distroless).
533533
534534
You can use the `kubectl debug` command to add ephemeral containers to a
535535
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.
544536
-->
545537
## 使用临时容器来调试的例子 {#ephemeral-container-example}
546538

547539
你可以使用 `kubectl debug` 命令来给正在运行中的 Pod 增加一个临时容器。
548540
首先,像示例一样创建一个 pod:
549541

550542
```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
552544
```
553545

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+
-->
555551
本节示例中使用 `pause` 容器镜像,因为它不包含调试程序,但是这个方法适用于所有容器镜像。
556-
{{< /note >}}
557552

558553
<!--
559554
If you attempt to use `kubectl exec` to create a shell you will see an error

0 commit comments

Comments
 (0)