changes.mady.by.user Sansae
Saved on Mar 04, 2024
Saved on Mar 05, 2024
...
sansae@sansaeAir15m2 k8s-lab-workspace % echo -n 'password' | base64 cGFzc3dvcmQ= sansae@sansaeAir15m2 k8s-lab-workspace % echo -n 'cGFzc3dvcmQ=' | base64 --decode password%
password% → %는 화면에만 출력되며 실제값에는 영향을 끼치지 않습니다.
Opaque
kubernetes.io/service-account-token
kubernetes.io/dockercfg
~/.dockercfg
kubernetes.io/dockerconfigjson
~/.docker/config.json
kubernetes.io/basic-auth
kubernetes.io/ssh-auth
kubernetes.io/tls
bootstrap.kubernetes.io/token
https://dev-k8sref-io.web.app/docs/config-and-storage/secret-v1/
kind: Secret
metadata (ObjectMeta)
data (map[string][]byte)
immutable (boolean)
stringData (map[string]string)
type (string)
apiVersion: v1 kind: Secret metadata: name: mysecret type: Opaque data: USER_NAME: YWRtaW4= # admin PASSWORD: MWYyZDFlMmU2N2Rm # 1f2d1e2e67df
apiVersion: v1 kind: Pod metadata: name: secret-test-pod spec: containers: - name: test-container image: registry.k8s.io/busybox command: [ "/bin/sh", "-c", "env" ] envFrom: - secretRef: name: mysecret restartPolicy: Never