kubectl get secret

1 개요[ | ]

kubectl get secret
kubectl get secrets
$ kubectl get secrets
NAME                  TYPE                                  DATA      AGE
db-user-pass          Opaque                                2         51s
$ kubectl get secret mysecret -o yaml
apiVersion: v1
data:
  username: YWRtaW4=
  password: MWYyZDFlMmU2N2Rm
kind: Secret
metadata:
  creationTimestamp: 2016-01-22T18:41:56Z
  name: mysecret
  namespace: default
  resourceVersion: "164619"
  selfLink: /api/v1/namespaces/default/secrets/mysecret
  uid: cfee02d6-c137-11e5-8d73-42010af00002
type: Opaque

$ kubectl get secret
NAME                  TYPE                                  DATA      AGE
default-token-pchjs   kubernetes.io/service-account-token   3      15m
$ kubectl describe secret
Name:         default-token-pchjs
Namespace:    default
Labels:       <none>
Annotations:  kubernetes.io/service-account.name=default
              kubernetes.io/service-account.uid=729a97bf-db3e-11e8-b1a3-0242ac110081

Type:  kubernetes.io/service-account-token

Data
====
ca.crt:     1066 bytes
namespace:  7 bytes
token:      eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6ImRlZmF1bHQtdG9rZW4tcGNoanMiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoiZGVmYXVsdCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjcyOWE5N2JmLWRiM2UtMTFlOC1iMWEzLTAyNDJhYzExMDA4MSIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpkZWZhdWx0OmRlZmF1bHQifQ.I0YUDwcD7I5FaByvW4k-DkZ5HIhMngc8UNnM_FghCr8dsT46KKbVcLdz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bGNtNWxkR1Z6TG1sdkwzTmxjblpwWTJWaFkyTnZkVzUwTDNObGNuWnBZMlV0WVdOamIzVnVkQzV1WVcxbElqb2laR1ZtWVhWc2RDSXNJbXQxWW1WeWJtVjBaWE11YVc4dmMyVnlkbWxqWldGalkyOTFiblF2YzJWeWRtbGpaUzFoWTJOdmRXNTBMblZwWkNJNklqY3lPV0U1TjJKbUxXUmlNMlV0TVRGbE9DMWlNV0V6TFRBeU5ESmhZekV4TURBNE1TSXNJbk4xWWlJNkluTjVjM1JsYlRwelpYSjJhV05sWVdOamIzVnVkRHBrWldaaGRXeDBPbVJsWm1GMWJIUWlmUS5JMFlVRHdjRDdJNUZhQnl2VzRrLURrWjVISWhNbmdjOFVObk1fRmdoQ3I4ZHNUNDZLS2JWY0xkellmcFlpWUFrWjJzcERvZF9iLWdHMDd1N0hObFc3aWpBRENHeWVpeGlmdkdXZTJ2dGFyOVZUb29DbzBBT2NIbWs2NklMQi1kVlhGa1poMDNBM2dxM2IxSFMtb1JCcm9weXdWRS1NUEY3RGRKXzFBYi1FZDY2S2FtTGIxc2NHWThNa3RRWGhidmxteDFZemg3SmhjSkU0OVJQbEk4Q1V2b0tFX2wyQzVnenNzcjlLV2FYdXBOX0wxNUZvcC1WaXRiTnZnU1NFN0dMVjdUZG51akhIVWxfQXlVSUF6Y0dkaEZXNFN0QUN6Ui1DZHotYVRsRGZrUVcxRlEzbGYyOGdDdUg4ejZ2dU1EUlBuamZ4RE84M3RhUTBGMWZmWV92dUE=
kind: Secret
metadata:
  annotations:
    kubernetes.io/service-account.name: default
    kubernetes.io/service-account.uid: 729a97bf-db3e-11e8-b1a3-0242ac110081
  creationTimestamp: 2018-10-29T05:49:49Z
  name: default-token-pchjs
  namespace: default
  resourceVersion: "55"
  selfLink: /api/v1/namespaces/default/secrets/default-token-pchjs
  uid: 729c3f4c-db3e-11e8-b1a3-0242ac110081
type: kubernetes.io/service-account-token

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}