Merge pull request #26257 from chenxuc/service_account2

[zh] Sync web page for config service account
This commit is contained in:
Kubernetes Prow Robot
2021-01-28 07:07:36 -08:00
committed by GitHub
@@ -125,6 +125,14 @@ You can list this and any other serviceAccount resources in the namespace with t
```shell ```shell
kubectl get serviceAccounts kubectl get serviceAccounts
```
<!--
The output is similar to this:
-->
输出类似于:
```
NAME SECRETS AGE NAME SECRETS AGE
default 1 1d default 1 1d
``` ```
@@ -141,9 +149,15 @@ kind: ServiceAccount
metadata: metadata:
name: build-robot name: build-robot
EOF EOF
serviceaccount/build-robot created
``` ```
<!--
The name of a ServiceAccount object must be a valid
[DNS subdomain name](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names).
-->
ServiceAccount 对象的名字必须是一个有效的
[DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names).
<!-- <!--
If you get a complete dump of the service account object, like this: If you get a complete dump of the service account object, like this:
--> -->
@@ -151,6 +165,14 @@ If you get a complete dump of the service account object, like this:
```shell ```shell
kubectl get serviceaccounts/build-robot -o yaml kubectl get serviceaccounts/build-robot -o yaml
```
<!--
The output is similar to this:
-->
输出类似于:
```yaml
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
@@ -229,6 +251,14 @@ Any tokens for non-existent service accounts will be cleaned up by the token con
```shell ```shell
kubectl describe secrets/build-robot-secret kubectl describe secrets/build-robot-secret
```
<!--
The output is similar to this:
-->
输出类似于:
```
Name: build-robot-secret Name: build-robot-secret
Namespace: default Namespace: default
Labels: <none> Labels: <none>
@@ -384,23 +414,26 @@ myregistrykey
--> -->
## 服务帐户令牌卷投射 {#service-account-token-volume-projection} ## 服务帐户令牌卷投射 {#service-account-token-volume-projection}
{{< feature-state for_k8s_version="v1.12" state="beta" >}} {{< feature-state for_k8s_version="v1.20" state="stable" >}}
<!-- <!--
This ServiceAccountTokenVolumeProjection is __beta__ in 1.12 and To enable and use token request projection, you must specify each of the following
enabled by passing all of the following flags to the API server: command line arguments to `kube-apiserver`:
* `--service-account-issuer` * `--service-account-issuer`
* `--service-account-key-file`
* `--service-account-signing-key-file` * `--service-account-signing-key-file`
* `--service-account-api-audiences` * `--api-audiences`
--> -->
{{< note >}} {{< note >}}
ServiceAccountTokenVolumeProjection 在 1.12 版本中是 __beta__ 阶段, 为了启用令牌请求投射,你必须为 `kube-apiserver` 设置以下命令行参数:
可以通过向 API 服务器传递以下所有参数来启用它:
* `--service-account-issuer` * `--service-account-issuer`
* `--service-account-key-file`
* `--service-account-signing-key-file` * `--service-account-signing-key-file`
* `--service-account-api-audiences` * `--api-audiences`
{{< /note >}} {{< /note >}}
<!-- <!--
@@ -438,7 +471,8 @@ kubectl create -f https://k8s.io/examples/pods/pod-projected-svc-token.yaml
<!-- <!--
The kubelet will request and store the token on behalf of the pod, make the The kubelet will request and store the token on behalf of the pod, make the
token available to the pod at a configurable file path, and refresh the token as it approaches expiration. Kubelet proactively rotates the token if it is older than 80% of its total TTL, or if the token is older than 24 hours. token available to the pod at a configurable file path, and refresh the token as it approaches expiration.
The kubelet proactively rotates the token if it is older than 80% of its total TTL, or if the token is older than 24 hours.
The application is responsible for reloading the token when it rotates. Periodic reloading (e.g. once every 5 minutes) is sufficient for most use cases. The application is responsible for reloading the token when it rotates. Periodic reloading (e.g. once every 5 minutes) is sufficient for most use cases.
--> -->
@@ -455,7 +489,7 @@ The application is responsible for reloading the token when it rotates. Periodic
--> -->
## 发现服务账号分发者 ## 发现服务账号分发者
{{< feature-state for_k8s_version="v1.18" state="alpha" >}} {{< feature-state for_k8s_version="v1.20" state="beta" >}}
<!-- <!--
The Service Account Issuer Discovery feature is enabled by enabling the The Service Account Issuer Discovery feature is enabled by enabling the
@@ -572,4 +606,3 @@ See also:
- [服务账号的集群管理员指南](/zh/docs/reference/access-authn-authz/service-accounts-admin/) - [服务账号的集群管理员指南](/zh/docs/reference/access-authn-authz/service-accounts-admin/)
- [服务账号签署密钥检索 KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-auth/20190730-oidc-discovery.md) - [服务账号签署密钥检索 KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-auth/20190730-oidc-discovery.md)
- [OIDC 发现规范](https://openid.net/specs/openid-connect-discovery-1_0.html) - [OIDC 发现规范](https://openid.net/specs/openid-connect-discovery-1_0.html)