# Secret

SecretSecret holds secret data of a certain type.apiVersion: v1import "k8s.io/api/core/v1"SecretSecret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.apiVersion: v1kind: Secretmetadata (ObjectMeta)Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadatadata (map[string][]byte)Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4immutable (boolean)Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.stringData (map[string]string)stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.type (string)Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-typesSecretListSecretList is a list of Secret.apiVersion: v1kind: SecretListmetadata (ListMeta)Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsitems ([]Secret), requiredItems is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secretOperationsget read the specified SecretHTTP RequestGET /api/v1/namespaces/{namespace}/secrets/{name}Parametersname (in path): string, requiredname of the Secretnamespace (in path): string, requirednamespacepretty (in query): stringprettyResponse200 (Secret): OK401: Unauthorizedlist list or watch objects of kind SecretHTTP RequestGET /api/v1/namespaces/{namespace}/secretsParametersnamespace (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 (SecretList): OK401: Unauthorizedlist list or watch objects of kind SecretHTTP RequestGET /api/v1/secretsParametersallowWatchBookmarks (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 (SecretList): OK401: Unauthorizedcreate create a SecretHTTP RequestPOST /api/v1/namespaces/{namespace}/secretsParametersnamespace (in path): string, requirednamespacebody: Secret, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Secret): OK201 (Secret): Created202 (Secret): Accepted401: Unauthorizedupdate replace the specified SecretHTTP RequestPUT /api/v1/namespaces/{namespace}/secrets/{name}Parametersname (in path): string, requiredname of the Secretnamespace (in path): string, requirednamespacebody: Secret, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Secret): OK201 (Secret): Created401: Unauthorizedpatch partially update the specified SecretHTTP RequestPATCH /api/v1/namespaces/{namespace}/secrets/{name}Parametersname (in path): string, requiredname of the Secretnamespace (in path): string, requirednamespacebody: Patch, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationforce (in query): booleanforcepretty (in query): stringprettyResponse200 (Secret): OK201 (Secret): Created401: Unauthorizeddelete delete a SecretHTTP RequestDELETE /api/v1/namespaces/{namespace}/secrets/{name}Parametersname (in path): string, requiredname of the Secretnamespace (in path): string, requirednamespacebody: DeleteOptionsdryRun (in query): stringdryRungracePeriodSeconds (in query): integergracePeriodSecondsignoreStoreReadErrorWithClusterBreakingPotential (in query): booleanignoreStoreReadErrorWithClusterBreakingPotentialpretty (in query): stringprettypropagationPolicy (in query): stringpropagationPolicyResponse200 (Status): OK202 (Status): Accepted401: Unauthorizeddeletecollection delete collection of SecretHTTP RequestDELETE /api/v1/namespaces/{namespace}/secretsParametersnamespace (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.