Created
March 29, 2021 10:43
-
-
Save developer-guy/0ed958769490733564e448e63f57052d to your computer and use it in GitHub Desktop.
test-deployment test commands
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
# lets feed Vault with the corresponding secret first. | |
$ vault kv put secret/accounts/aws AWS_SECRET_ACCESS_KEY=s3cr3t | |
$ kubectl apply -f test-deployment.yaml | |
deployment.apps/hello-secrets created | |
$ kubectl get pods | |
NAME READY STATUS RESTARTS AGE | |
hello-secrets-66757f644f-25rv7 1/1 Running 0 74s | |
vault-0 3/3 Running 0 50m | |
vault-configurer-59c79f4b9f-2xrgt 1/1 Running 0 50m | |
# check logs to see the real value of the environment variable | |
$ kubectl logs -f hello-secrets-66757f644f-25rv7 | |
Alias tip: k logs -f hello-secrets-66757f644f-25rv7 | |
time="2021-03-29T10:42:00Z" level=info msg="received new Vault token" app=vault-env | |
time="2021-03-29T10:42:00Z" level=info msg="initial Vault token arrived" app=vault-env | |
time="2021-03-29T10:42:00Z" level=info msg="spawning process: [sh -c echo $AWS_SECRET_ACCESS_KEY && echo going to sleep... && sleep 10000]" app=vault-env | |
s3cr3t | |
going to sleep... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment