Chapter 6: Building and Deploying Your Operator
At this point, we have written a significant amount of code to develop an nginx Operator, but code itself is useless unless compiled and deployed into a cluster. This chapter will demonstrate how to do just that. Specifically, the following sections will show how to use the make
command provided by a boilerplate Operator SDK project to build a container image and manually deploy that image in a running Kubernetes cluster. In addition, this chapter will follow up those steps with guided steps for iterative development in which new changes in the Operator are compiled and pushed to the cluster. Finally, we will offer troubleshooting resources and tips for issues that may arise during this process. Those sections will be broken into the following:
- Building a container image
- Deploying in a test cluster
- Pushing and testing changes
- Troubleshooting
Note that during the course of this chapter, running the Operator in...