Exercises
In this chapter, we have covered Kubernetes and the clustering process in detail. In order to enhance this knowledge, we recommend the following exercises:
- Run a
hello worldapplication on the Kubernetes cluster:- The
hello worldapplication can look exactly the same as the one we described in the exercises for Chapter 2, Introducing Docker. - Deploy the application with three replicas.
- Expose the application with the
NodePortservice. - Make a request (using
curl) to the application.
- The
- Implement a new feature, Goodbye World!, and deploy it using a rolling update:
- This feature can be added as a new endpoint,
/bye, which always returns Goodbye World!. - Rebuild a Docker image with a new version tag.
- Use the
RollingUpdatestrategy andreadinessProbe. - Observe the rolling update procedure.
- Make a request (using
curl) to the application.
- This feature can be added as a new endpoint,