Doing a quick refresher with Vault on minikube.
Everything works fine until the Launch a web application section. The web app (hashieducation/simple-vault-client:latest) deploys and runs without issue; steps 1-4 are good.
However, step 5 curl http://localhost:8080
executes but there’s no output; I do get a white page so at least the UI is being served even if there’s no text. Troubleshooting steps
- I’ve shelled into the container
- curl http://localhost:8080: no output
- installed tree and nmap
# nmap localhost
...
PORT STATE SERVICE
8080/tcp open http-proxy (the port is open for business)
# cat $JWT_PATH: expected output
- Search for
secret/data/webapp/config
Test to get expected output from find: success
# find / -type d -wholename '/etc/apt'
/etc/apt
Since there is no leading slash in secret/data/webapp/config
the search begins in the current directory:
# find . -type d -wholename 'secret/data/webapp/config'
Again, no output.
root@webapp-59c4db954f-d6p4w:/app# ls -l
-rw-r--r-- 1 root root 349 Feb 15 2023 Dockerfile
-rw-r--r-- 1 root root 11357 Feb 14 2023 LICENSE
-rw-r--r-- 1 root root 1201 Feb 17 2023 README.md
-rw-r--r-- 1 root root 28 Feb 14 2023 go.mod
drwxr-xr-x 2 root root 4096 Feb 17 2023 images
-rwxr-xr-x 1 root root 7182799 Mar 2 2023 main
-rw-r--r-- 1 root root 2967 Feb 14 2023 main.go
-rw-r--r-- 1 root root 1746 Feb 14 2023 types.go
-rw-r--r-- 1 root root 967 Feb 17 2023 vault-hello-world.yaml
But, it appears there’s no secret
directory anywhere
# find / -type d -name '*secret*'
/sys/module/secretmem
/usr/share/doc/git/contrib/credential/libsecret
/run/secrets
root@webapp-59c4db954f-d6p4w:/app# tree /run/secrets/
/run/secrets/
`-- kubernetes.io
`-- serviceaccount
|-- ca.crt -> ..data/ca.crt
|-- namespace -> ..data/namespace
`-- token -> ..data/token
And the one directory with secret
in the name does not have data/webapp/config
under it.
Does the container have a bug or am I missing something?
If it’s a bug, what is it?
- in the documentation?
- vault doesn’t write to the correct path?
- maybe the webapp retrieves data from the wrong location?
Please advise.