ServiceAccount
apiVersion: v1
import "k8s.io/api/core/v1"
ServiceAccount
ServiceAccount 將以下項目綁定在一起:* 使用者以及周邊系統可以理解的名稱,用於標識身份 * 可以進行身份驗證和授權的主體 * 一組密鑰
apiVersion: v1
kind: ServiceAccount
metadata (ObjectMeta)
標準物件的 metadata。 更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
automountServiceAccountToken (boolean)
AutomountServiceAccountToken 指出是否應自動掛載以這個服務帳戶身分執行的 Pod 的 API 令牌。可以在 Pod 層級覆寫。
imagePullSecrets ([]LocalObjectReference)
原子性:將在合併期間被取代
ImagePullSecrets 是相同命名空間中密鑰的參考清單,用於拉取 Pod 中參考此 ServiceAccount 的任何鏡像。 ImagePullSecrets 與 Secrets 不同,因為 Secrets 可以掛載在 Pod 中,但 ImagePullSecrets 僅由 kubelet 存取。 更多資訊:https://kubernetes.dev.org.tw/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
secrets ([]ObjectReference)
Patch 策略:在鍵
name
上合併Map:在鍵 name 上的唯一值將在合併期間保留
Secrets 是相同命名空間中密鑰的清單,允許使用此 ServiceAccount 執行的 Pod 使用這些密鑰。 僅當此服務帳戶的 "kubernetes.io/enforce-mountable-secrets" 註解設定為 "true" 時,Pods 才僅限於此清單。 此欄位不應用於尋找自動產生的服務帳戶令牌密鑰,以在 Pod 外部使用。 相反地,可以使用 TokenRequest API 直接請求令牌,或者可以手動建立服務帳戶令牌密鑰。 更多資訊:https://kubernetes.dev.org.tw/docs/concepts/configuration/secret
ServiceAccountList
ServiceAccountList 是 ServiceAccount 物件的清單
apiVersion: v1
kind: ServiceAccountList
metadata (ListMeta)
標準清單 metadata。 更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]ServiceAccount), required
ServiceAccount 清單。 更多資訊:https://kubernetes.dev.org.tw/docs/tasks/configure-pod-container/configure-service-account/
操作
get
讀取指定的 ServiceAccount
HTTP 請求
GET /api/v1/namespaces/{namespace}/serviceaccounts/{name}
參數
name (in path): string, required
ServiceAccount 的名稱
namespace (in path): string, required
pretty (in query): string
回應
200 (ServiceAccount): OK
401: 未經授權
list
列出或監看 ServiceAccount 類型的物件
HTTP 請求
GET /api/v1/namespaces/{namespace}/serviceaccounts
參數
namespace (in path): string, required
allowWatchBookmarks (in query): boolean
continue (in query): string
fieldSelector (in query): string
labelSelector (in query): string
limit (in query): integer
pretty (in query): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
watch (in query): boolean
回應
200 (ServiceAccountList): OK
401: 未經授權
list
列出或監看 ServiceAccount 類型的物件
HTTP 請求
GET /api/v1/serviceaccounts
參數
allowWatchBookmarks (in query): boolean
continue (in query): string
fieldSelector (in query): string
labelSelector (in query): string
limit (in query): integer
pretty (in query): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
watch (in query): boolean
回應
200 (ServiceAccountList): OK
401: 未經授權
create
建立 ServiceAccount
HTTP 請求
POST /api/v1/namespaces/{namespace}/serviceaccounts
參數
namespace (in path): string, required
body: ServiceAccount, required
dryRun (in query): string
fieldManager (in query): string
fieldValidation (in query): string
pretty (in query): string
回應
200 (ServiceAccount): OK
201 (ServiceAccount): Created
202 (ServiceAccount): Accepted
401: 未經授權
update
取代指定的 ServiceAccount
HTTP 請求
PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}
參數
name (in path): string, required
ServiceAccount 的名稱
namespace (in path): string, required
body: ServiceAccount, required
dryRun (in query): string
fieldManager (in query): string
fieldValidation (in query): string
pretty (in query): string
回應
200 (ServiceAccount): OK
201 (ServiceAccount): Created
401: 未經授權
patch
部分更新指定的 ServiceAccount
HTTP 請求
PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}
參數
name (in path): string, required
ServiceAccount 的名稱
namespace (in path): string, required
body: Patch, required
dryRun (in query): string
fieldManager (in query): string
fieldValidation (in query): string
force (in query): boolean
pretty (in query): string
回應
200 (ServiceAccount): OK
201 (ServiceAccount): Created
401: 未經授權
delete
刪除 ServiceAccount
HTTP 請求
DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}
參數
name (in path): string, required
ServiceAccount 的名稱
namespace (in path): string, required
body: DeleteOptions
dryRun (in query): string
gracePeriodSeconds (in query): integer
pretty (in query): string
propagationPolicy (in query): string
回應
200 (ServiceAccount): OK
202 (ServiceAccount): Accepted
401: 未經授權
deletecollection
刪除 ServiceAccount 的集合
HTTP 請求
DELETE /api/v1/namespaces/{namespace}/serviceaccounts
參數
namespace (in path): string, required
body: DeleteOptions
continue (in query): string
dryRun (in query): string
fieldSelector (in query): string
gracePeriodSeconds (in query): integer
labelSelector (in query): string
limit (in query): integer
pretty (in query): string
propagationPolicy (in query): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
回應
200 (Status): OK
401: 未經授權
此頁面為自動產生。
如果您計劃回報此頁面的問題,請在您的問題描述中提及此頁面是自動產生的。 修復可能需要在 Kubernetes 專案中的其他地方進行。