ServiceAccount
apiVersion: v1
import "k8s.io/api/core/v1"
ServiceAccount
ServiceAccount 包含以下內容: * 使用者(可能還有外圍系統)理解的身份名稱 * 可被認證和授權的主體 * 一組 Secret
apiVersion: v1
kind: ServiceAccount
metadata (ObjectMeta)
標準物件的元資料。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
automountServiceAccountToken (布林值)
AutomountServiceAccountToken 指示作為此服務賬戶執行的 Pod 是否應自動掛載 API 令牌。可以在 Pod 級別覆蓋此設定。
imagePullSecrets ([]LocalObjectReference)
原子性:在合併期間將被替換
ImagePullSecrets 是指向同一名稱空間中 Secret 的引用列表,用於拉取 Pod 中引用此 ServiceAccount 的任何映象。ImagePullSecrets 與 Secrets 不同,因為 Secrets 可以掛載到 Pod 中,但 ImagePullSecrets 僅由 kubelet 訪問。更多資訊:https://kubernetes.club.tw/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
secrets ([]ObjectReference)
補丁策略:在鍵
name
上合併對映:合併時將保留鍵名上的唯一值
Secrets 是同一名稱空間中 Secret 的列表,使用此 ServiceAccount 執行的 Pod 允許使用這些 Secret。只有當此服務賬戶的 "kubernetes.io/enforce-mountable-secrets" 註解設定為 "true" 時,Pod 才會受此列表的限制。"kubernetes.io/enforce-mountable-secrets" 註解自 v1.32 起已棄用。建議使用單獨的名稱空間來隔離對掛載 Secret 的訪問。此欄位不應用於查詢 Pod 外部使用的自動生成的服務賬戶令牌 Secret。相反,可以透過 TokenRequest API 直接請求令牌,或者手動建立服務賬戶令牌 Secret。更多資訊:https://kubernetes.club.tw/docs/concepts/configuration/secret
ServiceAccountList
ServiceAccountList 是 ServiceAccount 物件的列表
apiVersion: v1
kind: ServiceAccountList
metadata (ListMeta)
標準列表元資料。更多資訊: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]ServiceAccount), 必填
ServiceAccount 列表。更多資訊:https://kubernetes.club.tw/docs/tasks/configure-pod-container/configure-service-account/
操作
get
讀取指定的 ServiceAccount
HTTP 請求
GET /api/v1/namespaces/{namespace}/serviceaccounts/{name}
引數
響應
200 (ServiceAccount): OK
401: 未授權
list
列出或監視 ServiceAccount 型別的物件
HTTP 請求
GET /api/v1/namespaces/{namespace}/serviceaccounts
引數
namespace (在路徑中): string,必填
allowWatchBookmarks (在查詢中): boolean
continue (在查詢中): string
fieldSelector (在查詢中): string
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
watch (在查詢中): boolean
響應
200 (ServiceAccountList): OK
401: 未授權
list
列出或監視 ServiceAccount 型別的物件
HTTP 請求
GET /api/v1/serviceaccounts
引數
allowWatchBookmarks (在查詢中): boolean
continue (在查詢中): string
fieldSelector (在查詢中): string
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
watch (在查詢中): boolean
響應
200 (ServiceAccountList): OK
401: 未授權
create
建立一個 ServiceAccount
HTTP 請求
POST /api/v1/namespaces/{namespace}/serviceaccounts
引數
namespace (在路徑中): string,必填
body: ServiceAccount, 必填
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (ServiceAccount): OK
201 (ServiceAccount): 已建立
202 (ServiceAccount): 已接受
401: 未授權
update
替換指定的 ServiceAccount
HTTP 請求
PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}
引數
name (在路徑中): string,必填
ServiceAccount 的名稱
namespace (在路徑中): string,必填
body: ServiceAccount, 必填
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (ServiceAccount): OK
201 (ServiceAccount): 已建立
401: 未授權
patch
部分更新指定的 ServiceAccount
HTTP 請求
PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}
引數
name (在路徑中): string,必填
ServiceAccount 的名稱
namespace (在路徑中): string,必填
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (ServiceAccount): OK
201 (ServiceAccount): 已建立
401: 未授權
delete
刪除 ServiceAccount
HTTP 請求
DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}
引數
name (在路徑中): string,必填
ServiceAccount 的名稱
namespace (在路徑中): string,必填
body: DeleteOptions
dryRun (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
pretty (在查詢中): string
propagationPolicy (在查詢中): string
響應
200 (ServiceAccount): OK
202 (ServiceAccount): 已接受
401: 未授權
deletecollection
刪除 ServiceAccount 集合
HTTP 請求
DELETE /api/v1/namespaces/{namespace}/serviceaccounts
引數
namespace (在路徑中): string,必填
body: DeleteOptions
continue (在查詢中): string
dryRun (在查詢中): string
fieldSelector (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
propagationPolicy (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
響應
200 (Status): OK
401: 未授權
本頁面是自動生成的。
如果你打算報告此頁面存在的問題,請在問題描述中提及此頁面是自動生成的。修復可能需要在 Kubernetes 專案的其他地方進行。