@@ -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
24
22
25
-
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
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
60
45
61
46
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
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
** (
}}">ListMetaa >)
119
103
120
104
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
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
161
149
- ** name** (** 路径参数** ): string, 必需
162
150
163
-
166
- ServiceAccount 的名称
151
+ ServiceAccount 的名称。
167
152
168
153
@@ -337,7 +321,6 @@ GET /api/v1/serviceaccounts
337
321
338
322
339
323
340
-
341
324
@@ -394,7 +377,6 @@ GET /api/v1/serviceaccounts
394
377
395
378
396
379
397
-
398
380
@@ -453,15 +435,13 @@ POST /api/v1/namespaces/{namespace}/serviceaccounts
453
435
454
436
455
437
456
-
457
438
460
441
- ** pretty** (** 查询参数** ): string
461
442
462
443
463
444
464
-
465
445
@@ -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
497
- - ** name** (** 路径参数** ): string, required
498
476
499
477
name of the ServiceAccount
478
+ -->
479
+ - ** name** (** 路径参数** ): string,必需
500
480
481
+ ServiceAccount 的名称。
501
482
502
483
@@ -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
573
555
- ** name** (** 路径参数** ): string,必需
574
556
575
-
578
- ServiceAccount 的名称
557
+ ServiceAccount 的名称。
579
558
580
559
@@ -616,21 +594,18 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}
616
594
617
595
618
596
619
-
620
597
623
600
- ** pretty** (** 查询参数** ): string
624
601
625
602
626
603
627
-
628
604
631
607
#### 响应
632
608
633
-
634
609
635
610
636
611
@@ -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
659
- - ** name** (** 路径参数** ): string,必需
660
633
661
-
664
- ServiceAccount 的名称
635
+ -->
636
+ - ** name ** ( ** 路径参数 ** ): string,必需
665
637
638
+ ServiceAccount 的名称。
666
639
667
640
695
666
- ** pretty** (** 查询参数** ): string
696
667
697
668
698
669
699
-
700
670
- ** propagationPolicy** (* in query* ): string
701
671
702
672
703
673
704
-
705
674
@@ -736,7 +705,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
736
705
737
706
738
707
739
-
740
708
741
709
742
710
@@ -761,7 +728,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
761
728
762
729
763
730
764
-
765
731
@@ -783,7 +749,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
783
749
784
750
785
751
786
-
787
752
@@ -826,7 +791,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
826
791
827
792
828
793
829
-
830
794
0 commit comments