To test what we’ve just created, we will:
dj podjazz-v1 and metal-v1 backendsFirst we will exec into the dj pod
export DJ_POD_NAME=$(kubectl get pods -n prod -l app=dj -o jsonpath='{.items[].metadata.name}')
kubectl exec -n prod -it ${DJ_POD_NAME} bash
You will see a prompt from within the dj container.
Now from the dj container, we’ll issue a curl request to the jazz-v1 backend service:
curl -s jazz-v1:9080 | json_pp
Output should be similar to:
Try it again, but issue the command to the metal-v1 backend:
curl -s metal-v1:9080 | json_pp
You should get a list of heavy metal bands back:
When you’re done exploring this vast world of music, hit CTRL-D, or type exit to quit the container’s shell.