Skip to content
BleemeoBleemeo

Upgrade on Kubernetes

Professional

The agent runs as a DaemonSet with a rolling update strategy: during an upgrade, Kubernetes replaces the Glouton pods one node at a time. Use the same method you used for the installation.

The published k8s.yaml always references the latest Glouton version, so upgrading means applying it again with the same values as during the installation:

Terminal window
export GLOUTON_BLEEMEO_ACCOUNT_ID=<YOUR-ACCOUNT-ID>
export GLOUTON_BLEEMEO_REGISTRATION_KEY=<YOUR-REGISTRATION-KEY>
export GLOUTON_KUBERNETES_CLUSTERNAME="my_k8s_cluster_name"
curl -s https://packages.bleemeo.com/bleemeo-agent/kubernetes/k8s.yaml | envsubst | kubectl apply -f -

If you customized the configuration with a glouton-custom.yaml file, apply it together with k8s.yaml, otherwise your changes are overwritten by the default configuration:

Terminal window
curl -s https://packages.bleemeo.com/bleemeo-agent/kubernetes/k8s.yaml | envsubst | kubectl apply -f -,./glouton-custom.yaml

Follow the rollout and check the deployed version:

Terminal window
kubectl rollout status daemonset/glouton
kubectl get daemonset glouton -o jsonpath='{.spec.template.spec.containers[0].image}'

If the new version causes a problem, go back to the previous one:

Terminal window
kubectl rollout undo daemonset/glouton

Refresh the chart repository, then run the same command as for the installation, with the same values:

Terminal window
helm repo update
helm upgrade --install glouton bleemeo-agent/glouton \
--set account_id="your_account_id" \
--set registration_key="your_registration_key" \
--set config.kubernetes.clustername="my_k8s_cluster_name" \
--set namespace="default"

If helm repo update reports no repository, add it first with helm repo add bleemeo-agent https://packages.bleemeo.com/bleemeo-agent/helm-charts.

Check the release, and roll back to the previous revision if needed:

Terminal window
helm history glouton
helm rollback glouton