Last active
April 23, 2019 18:18
-
-
Save johanngyger/7e51d9160096063199f13f0faa9f9990 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ envsubst < vault-kubernetes-authenticator-demo.yaml | k apply -f - | |
deployment.apps/vault-kubernetes-authenticator-demo created | |
$ k get all | |
NAME READY STATUS RESTARTS AGE | |
pod/vault-kubernetes-authenticator-demo-fc49b957c-b5bnx 1/1 Running 0 81s | |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 20h | |
NAME READY UP-TO-DATE AVAILABLE AGE | |
deployment.apps/vault-kubernetes-authenticator-demo 1/1 1 1 81s | |
NAME DESIRED CURRENT READY AGE | |
replicaset.apps/vault-kubernetes-authenticator-demo-fc49b957c 1 1 1 81s | |
$ k logs vault-kubernetes-authenticator-demo-fc49b957c-b5bnx -c vault-kubernetes-authenticator | |
2019/04/16 04:45:23 successfully authenticated to vault | |
2019/04/16 04:45:23 successfully stored vault token at /home/vault/.vault-token | |
$ k exec vault-kubernetes-authenticator-demo-fc49b957c-b5bnx -- sh -c "VAULT_ADDR=${VAULT_ADDR} sh" | |
~ $ cat /home/vault/.vault-token; echo | |
s.xrrJoCARIC0Z84vcvcwuH5XG | |
~ $ wget --header="X-Vault-Token: $(cat /home/vault/.vault-token)" -q -O - ${VAULT_ADDR}/v1/secret/data/demo/most-used-password | |
{"request_id":"12660a6b-7ad0-85bc-8841-d21c7cc8248a","lease_id":"","renewable":false,"lease_duration":0,"data":{"data":{"password":"123456"},"metadata":{"created_time":"2019-04-16T05:11:44.651116748Z","deletion_time":"","destroyed":false,"version":1}},"wrap_info":null,"warnings":null,"auth":null} | |
~ $ wget --header="X-Vault-Token: $(cat /home/vault/.vault-token)" -q -O - ${VAULT_ADDR}/v1/secret/data/sensitive-password | |
wget: server returned error: HTTP/1.1 403 Forbidden |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment