@@ -7,9 +7,7 @@ content_type: "api_reference"
7
7
description : " ServiceAccount 将以下内容绑定在一起:1. 用户可以理解的名称,也可能是外围系统理解的身份标识 2. 可以验证和授权的主体 3. 一组 Secret。"
8
8
title : " ServiceAccount"
9
9
weight : 1
10
- auto_generated : true
11
10
---
12
-
13
11
<!--
14
12
api_metadata:
15
13
apiVersion: "v1"
@@ -22,28 +20,17 @@ weight: 1
22
20
auto_generated: true
23
21
-->
24
22
25
- <!--
26
- The file is auto-generated from the Go source code of the component using a generic
27
- [generator](https://github.com/kubernetes-sigs/reference-docs/). To learn how
28
- to generate the reference documentation, please read
29
- [Contributing to the reference documentation](/docs/contribute/generate-ref-docs/).
30
- To update the reference content, please follow the
31
- [Contributing upstream](/docs/contribute/generate-ref-docs/contribute-upstream/)
32
- guide. You can file document formatting bugs against the
33
- [reference-docs](https://github.com/kubernetes-sigs/reference-docs/) project.
34
- -->
35
-
36
23
` apiVersion: v1 `
37
24
38
25
` import "k8s.io/api/core/v1" `
39
26
40
-
41
27
## ServiceAccount {#ServiceAccount}
42
28
43
29
<!--
44
30
ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets
45
31
-->
46
32
ServiceAccount 将以下内容绑定在一起:
33
+
47
34
* 用户可以理解的名称,也可能是外围系统理解的身份标识
48
35
* 可以验证和授权的主体
49
36
* 一组 Secret
@@ -52,16 +39,15 @@ ServiceAccount 将以下内容绑定在一起:
52
39
53
40
- ** apiVersion** : v1
54
41
55
-
56
42
- ** kind** : ServiceAccount
57
43
58
-
59
44
- ** metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a >)
60
45
61
46
<!--
62
47
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
63
48
-->
64
- 标准对象的元数据,更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
49
+ 标准对象的元数据,更多信息:
50
+ https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
65
51
66
52
- ** automountServiceAccountToken** (boolean)
67
53
@@ -77,8 +63,8 @@ ServiceAccount 将以下内容绑定在一起:
77
63
ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
78
64
-->
79
65
imagePullSecrets 是对同一命名空间中 Secret 的引用列表,用于拉取引用此 ServiceAccount 的 Pod 中的任何镜像。
80
- imagePullSecrets 与 Secrets 不同,因为 Secrets 可以挂载在 Pod 中,但 imagePullSecrets 只能由 kubelet 访问。
81
- 更多信息: https://kubernetes.io/zh-cn/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
66
+ imagePullSecrets 与 Secret 不同,因为 Secret 可以挂载在 Pod 中,但 imagePullSecrets 只能由 kubelet 访问。更多信息:
67
+ https://kubernetes.io/zh-cn/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
82
68
83
69
- ** secrets** ([ ] <a href="{{< ref "../common-definitions/object-reference#ObjectReference" >}}">ObjectReference</a >)
84
70
@@ -94,7 +80,7 @@ ServiceAccount 将以下内容绑定在一起:
94
80
-->
95
81
** 补丁策略:基于键 ` name ` 合并**
96
82
97
- Secrets 是允许使用此 ServiceAccount 运行的 Pod 使用的同一命名空间中的秘密列表。
83
+ secrets 是允许使用此 ServiceAccount 运行的 Pod 使用的同一命名空间中的秘密列表。
98
84
仅当此服务帐户的 “kubernetes.io/enforce-mountable-secrets” 注释设置为 “true” 时,Pod 才限于此列表。
99
85
此字段不应用于查找自动生成的服务帐户令牌机密以在 Pod 之外使用。
100
86
相反,可以使用 TokenRequest API 直接请求令牌,或者可以手动创建服务帐户令牌 Secret。
@@ -111,16 +97,15 @@ ServiceAccountList 是 ServiceAccount 对象的列表
111
97
112
98
- ** apiVersion** : v1
113
99
114
-
115
100
- ** kind** : ServiceAccountList
116
101
117
-
118
102
- ** metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a >)
119
103
120
104
<!--
121
105
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
122
106
-->
123
- 标准列表元数据, 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
107
+ 标准列表元数据, 更多信息:
108
+ https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
124
109
125
110
<!--
126
111
- **items** ([]<a href="{{< ref "../authentication-resources/service-account-v1#ServiceAccount" >}}">ServiceAccount</a>), required
@@ -130,7 +115,8 @@ ServiceAccountList 是 ServiceAccount 对象的列表
130
115
<!--
131
116
List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
132
117
-->
133
- ServiceAccount 列表,更多信息: https://kubernetes.io/zh-cn/docs/tasks/configure-pod-container/configure-service-account/
118
+ ServiceAccount 列表,更多信息:
119
+ https://kubernetes.io/zh-cn/docs/tasks/configure-pod-container/configure-service-account/
134
120
135
121
<!--
136
122
## Operations {#Operations}
@@ -157,13 +143,12 @@ GET /api/v1/namespaces/{namespace}/serviceaccounts/{name}
157
143
158
144
<!--
159
145
- **name** (*in path*): string, required
146
+
147
+ name of the ServiceAccount
160
148
-->
161
149
- ** name** (** 路径参数** ): string, 必需
162
150
163
- <!--
164
- name of the ServiceAccount
165
- -->
166
- ServiceAccount 的名称
151
+ ServiceAccount 的名称。
167
152
168
153
<!--
169
154
- **namespace** (*in path*): string, required
@@ -240,7 +225,6 @@ GET /api/v1/namespaces/{namespace}/serviceaccounts
240
225
241
226
<a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector</a >
242
227
243
-
244
228
<!--
245
229
- **limit** (*in query*): integer
246
230
-->
@@ -337,7 +321,6 @@ GET /api/v1/serviceaccounts
337
321
338
322
<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a >
339
323
340
-
341
324
<!--
342
325
- **labelSelector** (*in query*): string
343
326
-->
@@ -394,7 +377,6 @@ GET /api/v1/serviceaccounts
394
377
395
378
<a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch</a >
396
379
397
-
398
380
<!--
399
381
#### Response
400
382
-->
@@ -453,15 +435,13 @@ POST /api/v1/namespaces/{namespace}/serviceaccounts
453
435
454
436
<a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a >
455
437
456
-
457
438
<!--
458
439
- **pretty** (*in query*): string
459
440
-->
460
441
- ** pretty** (** 查询参数** ): string
461
442
462
443
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
463
444
464
-
465
445
<!--
466
446
#### Response
467
447
-->
@@ -480,7 +460,7 @@ POST /api/v1/namespaces/{namespace}/serviceaccounts
480
460
481
461
#### HTTP Request
482
462
-->
483
- ` update ` 替换指定的ServiceAccount
463
+ ### ` update ` 替换指定的 ServiceAccount
484
464
485
465
#### HTTP 请求
486
466
@@ -493,11 +473,12 @@ PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}
493
473
494
474
<!--
495
475
- **name** (*in path*): string, required
496
- -->
497
- - ** name** (** 路径参数** ): string, required
498
476
499
477
name of the ServiceAccount
478
+ -->
479
+ - ** name** (** 路径参数** ): string,必需
500
480
481
+ ServiceAccount 的名称。
501
482
502
483
<!--
503
484
- **namespace** (*in path*): string, required
@@ -532,7 +513,6 @@ PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}
532
513
533
514
<a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a >
534
515
535
-
536
516
<!--
537
517
- **pretty** (*in query*): string
538
518
-->
@@ -556,7 +536,7 @@ PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}
556
536
557
537
#### HTTP Request
558
538
-->
559
- ` patch ` 部分更新指定的 ServiceAccount
539
+ ### ` patch ` 部分更新指定的 ServiceAccount
560
540
561
541
#### HTTP 请求
562
542
@@ -569,13 +549,12 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}
569
549
570
550
<!--
571
551
- **name** (*in path*): string, required
552
+
553
+ name of the ServiceAccount
572
554
-->
573
555
- ** name** (** 路径参数** ): string,必需
574
556
575
- <!--
576
- name of the ServiceAccount
577
- -->
578
- ServiceAccount 的名称
557
+ ServiceAccount 的名称。
579
558
580
559
<!--
581
560
- **namespace** (*in path*): string, required
@@ -587,7 +566,6 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}
587
566
588
567
- ** body** : <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch</a >, required
589
568
590
-
591
569
<!--
592
570
- **dryRun** (*in query*): string
593
571
-->
@@ -616,21 +594,18 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}
616
594
617
595
<a href="{{< ref "../common-parameters/common-parameters#force" >}}">force</a >
618
596
619
-
620
597
<!--
621
598
- **pretty** (*in query*): string
622
599
-->
623
600
- ** pretty** (** 查询参数** ): string
624
601
625
602
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
626
603
627
-
628
604
<!--
629
605
#### Response
630
606
-->
631
607
#### 响应
632
608
633
-
634
609
200 (<a href="{{< ref "../authentication-resources/service-account-v1#ServiceAccount" >}}">ServiceAccount</a >): OK
635
610
636
611
201 (<a href="{{< ref "../authentication-resources/service-account-v1#ServiceAccount" >}}">ServiceAccount</a >): Created
@@ -643,8 +618,8 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}
643
618
#### HTTP Request
644
619
-->
645
620
### ` delete ` 删除一个 ServiceAccount
646
- #### HTTP 请求
647
621
622
+ #### HTTP 请求
648
623
649
624
DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}
650
625
@@ -655,14 +630,12 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}
655
630
656
631
<!--
657
632
- **name** (*in path*): string, required
658
- -->
659
- - ** name** (** 路径参数** ): string,必需
660
633
661
- <!--
662
634
name of the ServiceAccount
663
- -->
664
- ServiceAccount 的名称
635
+ -->
636
+ - ** name ** ( ** 路径参数 ** ): string,必需
665
637
638
+ ServiceAccount 的名称。
666
639
667
640
<!--
668
641
- **namespace** (*in path*): string, required
@@ -671,7 +644,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}
671
644
672
645
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a >
673
646
674
-
675
647
- ** body** : <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a >
676
648
677
649
<!--
@@ -688,20 +660,17 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}
688
660
689
661
<a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds</a >
690
662
691
-
692
663
<!--
693
664
- **pretty** (*in query*): string
694
665
-->
695
666
- ** pretty** (** 查询参数** ): string
696
667
697
668
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
698
669
699
-
700
670
- ** propagationPolicy** (* in query* ): string
701
671
702
672
<a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy</a >
703
673
704
-
705
674
<!--
706
675
#### Response
707
676
-->
@@ -736,7 +705,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
736
705
737
706
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a >
738
707
739
-
740
708
- ** body** : <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a >
741
709
742
710
<!--
@@ -746,7 +714,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
746
714
747
715
<a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue</a >
748
716
749
-
750
717
<!--
751
718
- **dryRun** (*in query*): string
752
719
-->
@@ -761,7 +728,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
761
728
762
729
<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a >
763
730
764
-
765
731
<!--
766
732
- **gracePeriodSeconds** (*in query*): integer
767
733
-->
@@ -783,7 +749,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
783
749
784
750
<a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit</a >
785
751
786
-
787
752
<!--
788
753
- **pretty** (*in query*): string
789
754
-->
@@ -826,7 +791,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
826
791
827
792
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a >
828
793
829
-
830
794
<!--
831
795
#### Response
832
796
-->
0 commit comments