@@ -525,7 +525,7 @@ https://github.com/GoogleContainerTools/distroless).
525
525
-->
526
526
## 使用临时调试容器来进行调试 {#ephemeral-container}
527
527
528
- {{< feature-state state="beta " for_k8s_version="v1.23 " >}}
528
+ {{< feature-state state="stable " for_k8s_version="v1.25 " >}}
529
529
530
530
当由于容器崩溃或容器镜像不包含调试程序(例如[ 无发行版镜像] ( https://github.com/GoogleContainerTools/distroless ) 等)
531
531
而导致 ` kubectl exec ` 无法运行时,{{< glossary_tooltip text="临时容器" term_id="ephemeral-container" >}}对于排除交互式故障很有用。
@@ -537,7 +537,7 @@ You can use the `kubectl debug` command to add ephemeral containers to a
537
537
running Pod. First, create a pod for the example:
538
538
539
539
```shell
540
- kubectl run ephemeral-demo --image=k8s.gcr .io/pause:3.1 --restart=Never
540
+ kubectl run ephemeral-demo --image=registry.k8s .io/pause:3.1 --restart=Never
541
541
```
542
542
543
543
The examples in this section use the `pause` container image because it does not
@@ -690,6 +690,7 @@ this scenario using `kubectl run`:
690
690
``` shell
691
691
kubectl run myapp --image=busybox:1.28 --restart=Never -- sleep 1d
692
692
```
693
+
693
694
<!--
694
695
Run this command to create a copy of `myapp` named `myapp-debug` that adds a
695
696
new Ubuntu container for debugging:
@@ -706,6 +707,7 @@ Defaulting debug container name to debugger-w7xmf.
706
707
If you don't see a command prompt, try pressing enter.
707
708
root@myapp-debug:/#
708
709
```
710
+
709
711
<!--
710
712
* `kubectl debug` automatically generates a container name if you don't choose
711
713
one using the `--container` flag.
@@ -822,6 +824,7 @@ Don't forget to clean up the debugging Pod when you're finished with it:
822
824
``` shell
823
825
kubectl delete pod myapp myapp-debug
824
826
```
827
+
825
828
<!--
826
829
### Copying a Pod while changing container images
827
830
@@ -840,6 +843,7 @@ As an example, create a Pod using `kubectl run`:
840
843
```
841
844
kubectl run myapp --image=busybox:1.28 --restart=Never -- sleep 1d
842
845
```
846
+
843
847
<!--
844
848
Now use `kubectl debug` to make a copy and change its container image
845
849
to `ubuntu`:
0 commit comments