August 2018
Intermediate to advanced
352 pages
12h 30m
English
Follow these steps:
$ echo -n "MyS3cRet123" > ./secret.txt
$ kubectl create secret generic my-secret --from-file=./secret.txt secret/my-secret created
$ kubectl describe secrets/my-secret

Create a file called secret_pod.yml and put the following inside it. We will use the file to create a pod that has a volume where we will mount our secret:
apiVersion: v1kind: Podmetadata: name: mypodspec: containers: - name: shell image: alpine command: - "bin/ash" ...
Read now
Unlock full access