Skip to content

Commit fdf2a43

Browse files
Update organize-cluster-access-kubeconfig.md
1 parent 49f6127 commit fdf2a43

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

content/zh-cn/docs/concepts/configuration/organize-cluster-access-kubeconfig.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ If you must use an untrusted kubeconfig file, inspect it carefully first, much a
4747
By default, `kubectl` looks for a file named `config` in the `$HOME/.kube` directory.
4848
You can specify other kubeconfig files by setting the `KUBECONFIG` environment
4949
variable or by setting the
50-
[`-kubeconfig`](/docs/reference/generated/kubectl/kubectl/) flag.
50+
[`--kubeconfig`](/docs/reference/generated/kubectl/kubectl/) flag.
5151
-->
5252
默认情况下,`kubectl``$HOME/.kube` 目录下查找名为 `config` 的文件。
5353
你可以通过设置 `KUBECONFIG` 环境变量或者设置
@@ -163,7 +163,7 @@ Here are the rules that `kubectl` uses when it merges kubeconfig files:
163163
以下是 `kubectl` 在合并 kubeconfig 文件时使用的规则。
164164

165165
<!--
166-
1. If the `-kubeconfig` flag is set, use only the specified file. Do not merge.
166+
1. If the `--kubeconfig` flag is set, use only the specified file. Do not merge.
167167
Only one instance of this flag is allowed.
168168
169169
Otherwise, if the `KUBECONFIG` environment variable is set, use it as a
@@ -203,7 +203,7 @@ Here are the rules that `kubectl` uses when it merges kubeconfig files:
203203
<!--
204204
1. Determine the context to use based on the first hit in this chain:
205205
206-
1. Use the `-context` command-line flag if it exists.
206+
1. Use the `--context` command-line flag if it exists.
207207
2. Use the `current-context` from the merged kubeconfig files.
208208
-->
209209
1. 根据此链中的第一个匹配确定要使用的上下文。
@@ -288,20 +288,20 @@ kubeconfig 文件中的文件和路径引用是相对于 kubeconfig 文件的位
288288
<!--
289289
## Proxy
290290
291-
You can configure `kubectl` to use proxy by setting `proxy-url` in the kubeconfig file, like:
291+
You can configure `kubectl` to use a proxy per cluster using `proxy-url` in your kubeconfig file, like this:
292292
-->
293293
## 代理
294294

295-
你可以在 `kubeconfig` 文件中设置 `proxy-url` 来为 `kubectl` 使用代理,例如:
295+
你可以在 `kubeconfig` 文件中,为每个集群配置 `proxy-url` 来让 `kubectl` 使用代理,例如
296296

297297
```yaml
298298
apiVersion: v1
299299
kind: Config
300300

301-
proxy-url: https://proxy.host:3128
302-
303301
clusters:
304302
- cluster:
303+
proxy-url: http://proxy.example.org:3128
304+
server: https://k8s.example.org/k8s/clusters/c-xxyyzz
305305
name: development
306306

307307
users:
@@ -310,14 +310,13 @@ users:
310310
contexts:
311311
- context:
312312
name: development
313-
314313
```
315314
316315
## {{% heading "whatsnext" %}}
317316
318317
<!--
319318
* [Configure Access to Multiple Clusters](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
320319
* [`kubectl config`](/docs/reference/generated/kubectl/kubectl-commands#config)
321-
--->
320+
-->
322321
* [配置对多集群的访问](/zh-cn/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
323322
* [`kubectl config`](/docs/reference/generated/kubectl/kubectl-commands#config)

0 commit comments

Comments
 (0)