Generating a Custom Resource from an Existing Eon Mode Database

To simplify Vertica on Kubernetes adoption, Vertica provides the vdb-gen migration tool that revives an existing Eon Mode database as a StatefulSet in Kubernetes. vdb-gen generates a custom resource (CR) from an existing Eon Mode database by connecting to the database and writing to stdout.

The vdb-gen tool is available for download as a release artifact in the vertica-kubernetes GitHub repository.

Use the -h flag to view a full list of the available vdb-gen options, including options for debugging and working with environment variables. The following steps generate a CR using basic commands:

  1. Execute vdb-gen and redirect the output to a YAML-formatted file:

    $ vdb-gen --password secret --name mydb vertdb > vdb.yaml

    The previous command uses the following flags and values:

    • password: The existing database superuser secret password.
    • name: The name of the new custom resource object.
    • The IP address of the existing database
    • vertdb: The name of the existing Eon Mode database.
    • vdb.yaml: The YAML formatted file that contains the custom resource definition generated by the vdb-gen tool.
  2. Use the admintools stop_db command to stop the existing database:

    $ /opt/vertica/bin/admintools -t stop_db -d vertdb

    Wait for the cluster lease to expire before continuing. For details, see Reviving an Eon Mode Database Cluster

  3. Apply the YAML-formatted manifest that was generated by the vdb-gen tool:

    $ kubectl apply -f vdb.yaml created

    For performance purposes, do not apply the manifest to resources that already contain a Vertica on Kubernetes install.

  4. The operator creates the StatefulSet, installs Vertica on each pod, and runs revive. To view the events generated for the new database, use kubectl describe:

    $ kubectl describe vdb mydb