Skip to content

Commit b7a9fe0

Browse files
authored
Merge pull request #29545 from chenxuc/task-access
[zh]sync access tasks files
2 parents 42a93ae + 1809def commit b7a9fe0

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

content/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,33 @@ It does not mean that there is a file named `kubeconfig`.
3434
这是一种引用配置文件的通用方式,并不意味着存在一个名为 `kubeconfig` 的文件。
3535
{{< /note >}}
3636

37+
38+
<!--
39+
{{< warning >}}
40+
Only use kubeconfig files from trusted sources. Using a specially-crafted kubeconfig file could result in malicious code execution or file exposure.
41+
If you must use an untrusted kubeconfig file, inspect it carefully first, much as you would a shell script.
42+
{{< /warning>}}
43+
-->
44+
{{< warning >}}
45+
只使用来源可靠的 kubeconfig 文件。使用特制的 kubeconfig 文件可能会导致恶意代码执行或文件暴露。
46+
如果必须使用不受信任的 kubeconfig 文件,请首先像检查 shell 脚本一样仔细检查它。
47+
{{< /warning>}}
48+
49+
3750
## {{% heading "prerequisites" %}}
3851

3952
{{< include "task-tutorial-prereqs.md" >}}
4053

4154
<!--
4255
To check that {{< glossary_tooltip text="kubectl" term_id="kubectl" >}} is installed,
4356
run `kubectl version --client`. The kubectl version should be
44-
[within one minor version](/docs/setup/release/version-skew-policy/#kubectl) of your
57+
[within one minor version](/releases/version-skew-policy/#kubectl) of your
4558
cluster's API server.
4659
-->
4760
要检查 {{< glossary_tooltip text="kubectl" term_id="kubectl" >}} 是否安装,
4861
执行 `kubectl version --client` 命令。
4962
kubectl 的版本应该与集群的 API 服务器
50-
[使用同一次版本号](/zh/docs/setup/release/version-skew-policy/#kubectl)
63+
[使用同一次版本号](/zh/releases/version-skew-policy/#kubectl)
5164

5265
<!-- steps -->
5366
<!--
@@ -378,12 +391,14 @@ For example:
378391
例如:
379392

380393
### Linux
394+
381395
```shell
382396
export KUBECONFIG_SAVED=$KUBECONFIG
383397
```
384398

385399
### Windows PowerShell
386-
```shell
400+
401+
```powershell
387402
$Env:KUBECONFIG_SAVED=$ENV:KUBECONFIG
388403
```
389404

@@ -409,7 +424,7 @@ export KUBECONFIG=$KUBECONFIG:config-demo:config-demo-2
409424

410425
### Windows PowerShell
411426

412-
```shell
427+
```powershell
413428
$Env:KUBECONFIG=("config-demo;config-demo-2")
414429
```
415430

@@ -503,7 +518,7 @@ export KUBECONFIG=$KUBECONFIG:$HOME/.kube/config
503518

504519
### Windows Powershell
505520

506-
```shell
521+
```powershell
507522
$Env:KUBECONFIG="$Env:KUBECONFIG;$HOME\.kube\config"
508523
```
509524

@@ -534,7 +549,7 @@ export KUBECONFIG=$KUBECONFIG_SAVED
534549

535550
### Windows PowerShell
536551

537-
```shell
552+
```powershell
538553
$Env:KUBECONFIG=$ENV:KUBECONFIG_SAVED
539554
```
540555

content/zh/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ for database debugging.
4040
1. 创建一个运行 MongoDB 的 deployment:
4141

4242
```shell
43-
kubectl apply -f https://k8s.io/examples/application/guestbook/mongo-deployment.yaml
43+
kubectl apply -f https://k8s.io/examples/application/mongodb/mongo-deployment.yaml
4444
```
4545

4646
<!--
@@ -117,7 +117,7 @@ for database debugging.
117117
2. 创建一个在网络上公开的 MongoDB 服务:
118118

119119
```shell
120-
kubectl apply -f https://k8s.io/examples/application/guestbook/mongo-service.yaml
120+
kubectl apply -f https://k8s.io/examples/application/mongodb/mongo-service.yaml
121121
```
122122

123123
<!--
@@ -284,16 +284,6 @@ the slightly simpler syntax:
284284
kubectl port-forward deployment/mongo :27017
285285
```
286286

287-
<!--
288-
The output is similar to this:
289-
-->
290-
输出应该类似于:
291-
292-
```
293-
Forwarding from 127.0.0.1:63753 -> 27017
294-
Forwarding from [::1]:63753 -> 27017
295-
```
296-
297287
<!--
298288
The `kubectl` tool finds a local port number that is not in use (avoiding low ports numbers,
299289
because these might be used by other applications). The output is similar to:

0 commit comments

Comments
 (0)