kind: Secret

From wikieduonline
Revision as of 14:23, 7 October 2022 by Welcome (talk | contribs) (→‎Example)
Jump to navigation Jump to search


https://kubernetes.io/docs/concepts/configuration/secret/#secret-types

type: Opaque
type: kubernetes.io/service-account-token

Types

https://kubernetes.io/docs/concepts/configuration/secret/#secret-types

Opaque	                                 arbitrary user-defined data
kubernetes.io/service-account-token	ServiceAccount token
kubernetes.io/dockercfg	                serialized ~/.dockercfg file
kubernetes.io/dockerconfigjson	        serialized ~/.docker/config.json file
kubernetes.io/basic-auth	        credentials for basic authentication
kubernetes.io/ssh-auth	                credentials for SSH authentication
kubernetes.io/tls	                data for a TLS client or server
bootstrap.kubernetes.io/token	        bootstrap token data


Examples

https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/

kubectl apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
  name: default-token
  annotations:
    kubernetes.io/service-account.name: default
type: kubernetes.io/service-account-token
EOF


https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#create-a-secret

apiVersion: v1
kind: Secret
metadata:
  name: test-secret
data:
  username: bXktYXBw
  password: Mzk1MjgkdmRnN0pi

Related

See also

Advertising: