Upgrading Deephaven in a Kubernetes environment
This guide covers upgrading Deephaven in a Kubernetes environment using Helm. Commands are shown for running in a Unix-like environment. It is very similar to the procedure described in the Kubernetes installation guide, minus some steps.
Note
The kubectl and helm commands shown in this guide do not explicitly set a namespace and assume that your environment is configured to operate in your intended namespace by default.
Prerequisites
You must meet the following prerequisites to upgrade Deephaven in Kubernetes:
- An existing Deephaven deployment running in a Kubernetes cluster.
kubectl,dockerandhelmcommand line tools.- An artifact repository to which Docker images can be stored and from which Kubernetes pods may pull them. In this example,
my-repo.dev/my-project/images/deephaven-installis used; replace this with your image repository URL. - A Deephaven distributable package containing a helm chart, support scripts, and Dockerfiles, e.g.
deephaven-helm-1.20240517.344.tar.gz.
If using Deephaven pre-built images:
- A Deephaven distributable package containing pre-built Docker images, e.g.,
deephaven-containers-1.20240517.344.tar.gz.
If building your own images:
- A distributable containing Deephaven Enterprise, e.g.,
deephaven-enterprise-1.20240517.344.tar.gz. - A distributable containing Deephaven Core+ worker, e.g.,
deephaven-coreplus-0.37.4-1.20240517.344.tgz.
Note
You can either use pre-built container images from Deephaven or build your own images. Building images allows for customizing them to make your JARs available to workers or to add plugins.
Unzip the Deephaven helm chart
Unpack the deephaven-helm package:
Push the Deephaven images to your image repository
If you are using Deephaven's pre-built images, load them into your local Docker repository.
To build images from Deephaven Docker files, first change the directory to the docker subdirectory within the unzipped
helm distribution and copy the Enterprise and Core+ distributions to the deephaven_base and db_query_worker_coreplus
directories, respectively.
- To build custom JARs into your images and make them available in Persistent Queries and Code Studios, create
a zipped tar file containing your JARs, copy it to the
deephaven_customerdirectory, and add a--customer-coreplus-jarflag to thebuildAllForK8s.shcommand. - To build plugin JARs into your images and make them available to non-worker processes, create
zipped tar files containing your plugins, copy them to the
deephaven_customerdirectory, and add up to 10--customer-pluginflags to thebuildAllForK8s.shcommand.
Change directory
The rest of the commands in this guide must be run from the helm subdirectory of the unpackaged helm distribution.
Install the Deephaven helm chart
The Deephaven helm upgrade requires the name of your Deephaven helm installation. Run helm list to find it if you do
not know what it is. Substitute your installation name in place of my-deephaven-deployment-name in the commands shown
below.
The upgrade also requires the override YAML file used for the last upgrade or installation. If unavailable, you can run helm get values my-deephaven-deployment-name to get the values configured previously. Substitute your override YAML file name for my-override-values.yaml in the commands below.
Note
Properties for a helm chart are typically stored in one or more YAML files. If more than one is provided to the helm command,
priority is given to the last (right-most) file specified with -f. Properties can also be provided with --set flags, which will take precedence over YAML settings.
Scale down your deployment and upgrade the Deephaven helm chart using your override YAML file with these commands:
The installation takes a couple of minutes. You can see progress by tailing the log output of the upgrade job with the command kubectl logs -f job/my-deephaven-deployment-name-pre-release-hook.