Upgrade Hydrolix

How to update Hydrolix on Kubernetes

Prerequisites

To upgrade (or downgrade) an existing cluster, you will need the following:

  • kubectl & config credentials to the cluster
  • python3 (v3.7+)

Set Environment Variables

The hkt CLI uses environment variables (or cli flags) to customize your operator.yaml file for deployment. Depending on the cloud provider, you will need either GKE or EKS variable set.

First, download the target hkt version and move it into your /bin directory

export HKT_VERSION=<i.e. v3.20.1>
export HDX_KUBERNETES_NAMESPACE=<i.e. production-service> 

# download the specified hkt version
curl -s -o hkt https://hdx-infrastructure.s3.amazonaws.com/hkt/hkt-${HKT_VERSION} && chmod +x hkt

# check the version is correct
./hkt version

# move it to a /bin directory
sudo mv hkt /usr/local/bin/

EKS Deployments

export AWS_ACCOUNT_ID="$(aws sts get-caller-identity --query "Account" --output text)"
export AWS_STORAGE_ROLE="arn:aws:iam::${AWS_ACCOUNT_ID}:role/${HDX_KUBERNETES_NAMESPACE}-bucket"

GKE Deployments

export PROJECT_ID=<e.g. "prod-12345">
export GCP_STORAGE_SA="hdx-${HDX_KUBERNETES_NAMESPACE}-sa@${PROJECT_ID}.iam.gserviceaccount.com"

Update the Operator

hkt operator-resources > operator.yaml

🚧

Node Targeting

Note if you are using node targeting you should use the hkt operator-resources command with the -c option with the name of your configuration file so all the correct flags are added to the operator.

For example:

hkt operator-resources -c hydrolixcluster.yaml > operator.yaml

Apply the YAML file to your cluster with the following command:

kubectl apply -f operator.yaml

Once your cluster completes the resulting rolling restart, your update is complete.

πŸ‘

Rollback

Downgrading versions uses the same process. Specify the version you want to rollback to in your HKT_VERSION variable.