Quickstart for Go-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.
    1. Create a project directory for your project and initialize the project:
    1. Create a simple Memcached API:
    1. operator-sdk create api --group cache --version v1alpha1 --kind Memcached --resource --controller
    1. Build and push your operator’s image:
    1. Install :
    1. Bundle your operator, then build and push the bundle image (defaults to example.com/memcached-operator-bundle:v0.0.1):
    1. make bundle IMG="example.com/memcached-operator:v0.0.1"
    1. operator-sdk run bundle example.com/memcached-operator-bundle:v0.0.1
    1. Create a sample Memcached custom resource:
    1. Uninstall the operator:
    1. operator-sdk cleanup memcached-operator

    Direct deployment

    1. Deploy your operator:
    1. Create a sample Memcached custom resource:
    1. Uninstall the operator:
    1. make undeploy