Quickstart for Helm-based Operators
- Go through the installation guide.
- User authorized with permissions.
- An accessible image registry for various operator images (ex. , quay.io) and be logged in in your command line environment.
example.com
is used as the registry Docker Hub namespace in these examples. Replace it with another value if using a different registry or namespace.
- 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
):
operator-sdk create api --group demo --version v1alpha1 --kind Nginx
- Build and push your operator’s image:
- Install :
- Bundle your operator, then build and push the bundle image (defaults to
example.com/nginx-operator-bundle:v0.0.1
):
make bundle IMG="example.com/nginx-operator:v0.0.1"
make bundle-build bundle-push
- Create a sample Nginx custom resource:
- Uninstall the operator:
operator-sdk cleanup nginx-operator
Direct deployment
- Deploy your operator:
make deploy IMG="example.com/nginx-operator:v0.0.1"
- Create a sample Nginx custom resource:
- Uninstall the operator:
make undeploy