Merge pull request #32710 from zaunist/docs/concepts_kubeconfig

[zh]: Resync organizs-cluster-access-kubeconfig.md
This commit is contained in:
Kubernetes Prow Robot
2022-04-02 02:00:09 -07:00
committed by GitHub
@@ -104,7 +104,8 @@ the *current context* to communicate with the cluster.
To choose the current context: To choose the current context:
--> -->
选择当前上下文 选择当前上下文
```
```shell
kubectl config use-context kubectl config use-context
``` ```
@@ -280,6 +281,34 @@ kubeconfig 文件中的文件和路径引用是相对于 kubeconfig 文件的位
命令行上的文件引用是相对于当前工作目录的。 命令行上的文件引用是相对于当前工作目录的。
`$HOME/.kube/config` 中,相对路径按相对路径存储,绝对路径按绝对路径存储。 `$HOME/.kube/config` 中,相对路径按相对路径存储,绝对路径按绝对路径存储。
<!--
## Proxy
You can configure `kubectl` to use proxy by setting `proxy-url` in the kubeconfig file, like:
-->
## 代理
你可以在 `kubeconfig` 文件中设置 `proxy-url` 来为 `kubectl` 使用代理,例如:
```yaml
apiVersion: v1
kind: Config
proxy-url: https://proxy.host:3128
clusters:
- cluster:
name: development
users:
- name: developer
contexts:
- context:
name: development
```
## {{% heading "whatsnext" %}} ## {{% heading "whatsnext" %}}
<!-- <!--
@@ -288,4 +317,3 @@ kubeconfig 文件中的文件和路径引用是相对于 kubeconfig 文件的位
---> --->
* [配置对多集群的访问](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) * [配置对多集群的访问](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
* [`kubectl config`](/docs/reference/generated/kubectl/kubectl-commands#config) * [`kubectl config`](/docs/reference/generated/kubectl/kubectl-commands#config)