From a literal value

Kubernetes supports creating a Secret with a single command line, as well:

// create a Secret via plain text in command line
# kubectl create secret generic access-token --from-literal=2-7-1_access-token=9S!g0U61699r
secret "access-token" created

Then we can use the get secret command to check if they're identical to the previous method:

// check the details of a Secret
# kubectl get secret access-token -o yaml
apiVersion: v1
data:
2-7-1_access-token: OVMhZzBVNjE2OTlyCg==
kind: Secret
metadata:
creationTimestamp: 2018-01-01T21:44:32Z
name: access-token
...
type: Opaque
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.134.218