Quickstart for Helm-based Operators
- Create a project directory for your project and initialize the project:
- Create a simple nginx API using Helm’s built-in chart boilerplate (from
helm create
):
- Use the built-in Makefile targets to build and push your operator. Make sure to define
IMG
when you call make
:
make docker-build docker-push IMG=$OPERATOR_IMG
- Install :
- Bundle your operator and push the bundle image:
make bundle IMG=$OPERATOR_IMG
# Note the "-bundle" component in the image name below.
export BUNDLE_IMG="quay.io/example/nginx-operator-bundle:v0.0.1"
- Run your bundle:
operator-sdk run bundle $BUNDLE_IMG
- Create a sample Nginx custom resource:
- Uninstall the operator:
operator-sdk cleanup nginx-operator
Direct deployment
- Deploy your operator:
make deploy IMG=$OPERATOR_IMG
- Create a sample Nginx custom resource:
- Uninstall the operator: