Skip to content

Commit 5b70a83

Browse files
committed
[zh] sync configure-access-multiple-clusters.md
1 parent 1cb5e12 commit 5b70a83

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

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

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ card:
66
name: tasks
77
weight: 40
88
---
9-
109
<!--
1110
title: Configure Access to Multiple Clusters
1211
content_type: task
@@ -17,6 +16,7 @@ card:
1716
-->
1817

1918
<!-- overview -->
19+
2020
<!--
2121
This page shows how to configure access to multiple clusters by using
2222
configuration files. After your clusters, users, and contexts are defined in
@@ -58,8 +58,7 @@ run `kubectl version --client`. The kubectl version should be
5858
cluster's API server.
5959
-->
6060
要检查 {{< glossary_tooltip text="kubectl" term_id="kubectl" >}} 是否安装,
61-
执行 `kubectl version --client` 命令。
62-
kubectl 的版本应该与集群的 API
61+
执行 `kubectl version --client` 命令。kubectl 的版本应该与集群的 API
6362
服务器[使用同一次版本号](/zh-cn/releases/version-skew-policy/#kubectl)
6463

6564
<!-- steps -->
@@ -415,7 +414,7 @@ $Env:KUBECONFIG_SAVED=$ENV:KUBECONFIG
415414
```
416415

417416
<!--
418-
The `KUBECONFIG` environment variable is a list of paths to configuration files. The list is
417+
The `KUBECONFIG` environment variable is a list of paths to configuration files. The list is
419418
colon-delimited for Linux and Mac, and semicolon-delimited for Windows. If you have
420419
a `KUBECONFIG` environment variable, familiarize yourself with the configuration files
421420
in the list.
@@ -519,8 +518,7 @@ For example:
519518
## 将 $HOME/.kube/config 追加到 KUBECONFIG 环境变量中 {#append-home-kube-config-to-your-kubeconfig-environment-variable}
520519

521520
如果有 `$HOME/.kube/config` 文件,并且还未列在 `KUBECONFIG` 环境变量中,
522-
那么现在将它追加到 `KUBECONFIG` 环境变量中。
523-
例如:
521+
那么现在将它追加到 `KUBECONFIG` 环境变量中。例如:
524522

525523
### Linux
526524

@@ -565,6 +563,29 @@ export KUBECONFIG="$KUBECONFIG_SAVED"
565563
$Env:KUBECONFIG=$ENV:KUBECONFIG_SAVED
566564
```
567565

566+
<!--
567+
## Check the subject represented by the kubeconfig
568+
569+
It is not always obvious what attributes (username, groups) you will get after authenticating to the cluster.
570+
It can be even more challenging if you are managing more than one cluster at the same time.
571+
-->
572+
## 检查 kubeconfig 所表示的主体 {#check-the-subject}
573+
574+
你在通过集群的身份验证后将获得哪些属性(用户名、组),这一点并不总是很明显。
575+
如果你同时管理多个集群,这可能会更具挑战性。
576+
577+
<!--
578+
There is a `kubectl` alpha subcommand command to check subject attributes, such as username,
579+
for your selected Kubernetes client context: `kubectl alpha auth whoami`.
580+
581+
Read [API access to authentication information for a client](/docs/reference/access-authn-authz/authentication/#self-subject-review)
582+
to learn about this in more detail.
583+
-->
584+
对于你所选择的 Kubernetes 客户端上下文,有一个 `kubectl` Alpha 子命令可以检查用户名等主体属性:
585+
`kubectl alpha auth whoami`
586+
587+
更多细节请参阅[通过 API 访问客户端的身份验证信息](/zh-cn/docs/reference/access-authn-authz/authentication/#self-subject-review)。
588+
568589
## {{% heading "whatsnext" %}}
569590

570591
<!--

0 commit comments

Comments
 (0)