# ServiceAccount

ServiceAccountServiceAccount 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.apiVersion: v1import "k8s.io/api/core/v1"ServiceAccountServiceAccount 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 secretsapiVersion: v1kind: ServiceAccountmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadataautomountServiceAccountToken (boolean)AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.imagePullSecrets ([]LocalObjectReference)Atomic: will be replaced during a mergeImagePullSecrets 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-podsecrets ([]ObjectReference)Patch strategy: merge on key nameMap: unique values on key name will be kept during a mergeSecrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a "kubernetes.io/enforce-mountable-secrets" annotation set to "true". The "kubernetes.io/enforce-mountable-secrets" annotation is deprecated since v1.32. Prefer separate namespaces to isolate access to mounted secrets. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secretServiceAccountListServiceAccountList is a list of ServiceAccount objectsapiVersion: v1kind: ServiceAccountListmetadata (ListMeta)Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsitems ([]ServiceAccount), requiredList of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/Operationsget read the specified ServiceAccountHTTP RequestGET /api/v1/namespaces/{namespace}/serviceaccounts/{name}Parametersname (in path): string, requiredname of the ServiceAccountnamespace (in path): string, requirednamespacepretty (in query): stringprettyResponse200 (ServiceAccount): OK401: Unauthorizedlist list or watch objects of kind ServiceAccountHTTP RequestGET /api/v1/namespaces/{namespace}/serviceaccountsParametersnamespace (in path): string, requirednamespaceallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (ServiceAccountList): OK401: Unauthorizedlist list or watch objects of kind ServiceAccountHTTP RequestGET /api/v1/serviceaccountsParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (ServiceAccountList): OK401: Unauthorizedcreate create a ServiceAccountHTTP RequestPOST /api/v1/namespaces/{namespace}/serviceaccountsParametersnamespace (in path): string, requirednamespacebody: ServiceAccount, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (ServiceAccount): OK201 (ServiceAccount): Created202 (ServiceAccount): Accepted401: Unauthorizedupdate replace the specified ServiceAccountHTTP RequestPUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}Parametersname (in path): string, requiredname of the ServiceAccountnamespace (in path): string, requirednamespacebody: ServiceAccount, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (ServiceAccount): OK201 (ServiceAccount): Created401: Unauthorizedpatch partially update the specified ServiceAccountHTTP RequestPATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}Parametersname (in path): string, requiredname of the ServiceAccountnamespace (in path): string, requirednamespacebody: Patch, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationforce (in query): booleanforcepretty (in query): stringprettyResponse200 (ServiceAccount): OK201 (ServiceAccount): Created401: Unauthorizeddelete delete a ServiceAccountHTTP RequestDELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}Parametersname (in path): string, requiredname of the ServiceAccountnamespace (in path): string, requirednamespacebody: DeleteOptionsdryRun (in query): stringdryRungracePeriodSeconds (in query): integergracePeriodSecondsignoreStoreReadErrorWithClusterBreakingPotential (in query): booleanignoreStoreReadErrorWithClusterBreakingPotentialpretty (in query): stringprettypropagationPolicy (in query): stringpropagationPolicyResponse200 (ServiceAccount): OK202 (ServiceAccount): Accepted401: Unauthorizeddeletecollection delete collection of ServiceAccountHTTP RequestDELETE /api/v1/namespaces/{namespace}/serviceaccountsParametersnamespace (in path): string, requirednamespacebody: DeleteOptionscontinue (in query): stringcontinuedryRun (in query): stringdryRunfieldSelector (in query): stringfieldSelectorgracePeriodSeconds (in query): integergracePeriodSecondsignoreStoreReadErrorWithClusterBreakingPotential (in query): booleanignoreStoreReadErrorWithClusterBreakingPotentiallabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettypropagationPolicy (in query): stringpropagationPolicyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondsResponse200 (Status): OK401: UnauthorizedThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.