"Kubectl create secret"의 두 판 사이의 차이

(새 문서: ==개요== ;kubectl create secret <source lang='console'> $ echo -n 'admin' > ./username.txt $ echo -n '1f2d1e2e67df' > ./password.txt $ kubectl create secret generic db-user-pass --...)
 
 
(같은 사용자의 중간 판 5개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{소문자}}
==개요==
==개요==
;kubectl create secret
;kubectl create secret


<source lang='console'>
localhost:~$ kubectl create secret generic mysql --from-literal=password=root
secret/mysql created
</source>
<source lang='console'>
localhost:~$ kubectl get secret mysql
NAME    TYPE    DATA  AGE
mysql  Opaque  1      9s
</source>
<source lang='console'>
localhost:~$ kubectl get secret mysql -oyaml
apiVersion: v1
data:
  password: cm9vdA==
kind: Secret
metadata:
  creationTimestamp: "2019-05-29T05:15:09Z"
  name: mysql
  namespace: default
  resourceVersion: "498655"
  selfLink: /api/v1/namespaces/default/secrets/mysql
  uid: ba82d526-81d0-11e9-93b4-0a2cc19750f8
type: Opaque
</source>
<source lang='console'>
localhost:~$ kubectl delete secret mysql
secret "mysql" deleted
</source>
==실습==
<source lang='console'>
<source lang='console'>
$ echo -n 'admin' > ./username.txt
$ echo -n 'admin' > ./username.txt
7번째 줄: 38번째 줄:
$ kubectl create secret generic db-user-pass --from-file=./username.txt --from-file=./password.txt
$ kubectl create secret generic db-user-pass --from-file=./username.txt --from-file=./password.txt
secret/db-user-pass created
secret/db-user-pass created
</source>
<source lang='console'>
$ kubectl get secret db-user-pass -oyaml | grep ^data: -A2
$ kubectl get secret db-user-pass -oyaml | grep ^data: -A2
data:
data:
14번째 줄: 47번째 줄:


==같이 보기==
==같이 보기==
* [[쿠버네티스 Secret]]
* [[kubectl create]]
* [[kubectl create]]
* [[kubectl create secret tls]]
* [[kubectl create secret tls]]
* [[kubectl get secret]]
* [[kubectl delete secret]]
* [[쿠버네티스 Secret]]


==참고==
==참고==

2019년 5월 29일 (수) 14:16 기준 최신판

1 개요[ | ]

kubectl create secret
localhost:~$ kubectl create secret generic mysql --from-literal=password=root
secret/mysql created
localhost:~$ kubectl get secret mysql
NAME    TYPE     DATA   AGE
mysql   Opaque   1      9s
localhost:~$ kubectl get secret mysql -oyaml
apiVersion: v1
data:
  password: cm9vdA==
kind: Secret
metadata:
  creationTimestamp: "2019-05-29T05:15:09Z"
  name: mysql
  namespace: default
  resourceVersion: "498655"
  selfLink: /api/v1/namespaces/default/secrets/mysql
  uid: ba82d526-81d0-11e9-93b4-0a2cc19750f8
type: Opaque
localhost:~$ kubectl delete secret mysql
secret "mysql" deleted

2 실습[ | ]

$ echo -n 'admin' > ./username.txt
$ echo -n '1f2d1e2e67df' > ./password.txt
$ kubectl create secret generic db-user-pass --from-file=./username.txt --from-file=./password.txt
secret/db-user-pass created
$ kubectl get secret db-user-pass -oyaml | grep ^data: -A2
data:
  password.txt: MWYyZDFlMmU2N2Rm
  username.txt: YWRtaW4=

3 같이 보기[ | ]

4 참고[ | ]

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