- Connect the "Log output" application and "Ping-pong" application. Instead of sharing data via files use HTTP endpoints to respond with the number of pongs. Deprecate all the volume between the two applications for the time being.
- Remove all volume references.
- Remove pv and pvc files from manifests.
- Remove volume references from deployments.
- Pong App:
- Remove volume referencees
- Add a new endoint, /count, that returns json data.
- Log-output app
- Remove volume referencees
- Request the the endpoint, /count, internally. In my case, it was
http://pingpong-svc:3001/count
- Start by testing pong app. This http://localhost:8081/pingpong should save data which will be useful in the next step.
- Once we hit http://localhost:8081/now, we should see two lines, (a) log output and (b) second pong count. Go refresh http://localhost:8081/pingpong and come back here to ensure the pong count is updated.
- cd to this directory, run `make relaunch-cluster`. Check http://localhost:8081/pingpong, check http://localhost:8081/now, check http://localhost:8081/pingpong to see a new count, and finally check http://localhost:8081/now .
Source: DevOps with Kubernetes