Follow these steps to upgrade kagent to the latest version and keep your cluster up to date with new features and bug fixes.
Before you begin#
-
Save the version that you want to upgrade to in an environment variable. For available versions, refer to the kagent releases.
export NEW_VERSION=<version-number> -
Read the release notes for the version you are upgrading to. Pay attention to any breaking changes or deprecations that might affect your configuration.
-
Back up your current configuration, including agent definitions and custom settings.
Upgrade kagent#
-
Get the Helm values file for your current kagent release.
helm get values kagent -n kagent -o yaml > values.yaml -
Compare your current Helm chart values with the version that you want to upgrade to.
-
Show all values:
helm show values oci://ghcr.io/kagent-dev/kagent/helm/kagent --version $NEW_VERSION -
Get a file with all values
helm pull oci://ghcr.io/kagent-dev/kagent/helm/kagent --version $NEW_VERSIONtar -xvf kagent-$NEW_VERSION.tgzopen kagent/values.yaml
-
-
Make any changes that you want by editing your
values.yamlHelm values file or preparing--setflags for the upgrade commands.Note: As of version 0.7, the kmcp subproject is included by default with kagent. To use an existing kmcp installation that you already set up separately, set
kmcp.enabled=falsein yourvalues.yamlfile or--setcommands for both thekagentandkagent-crdscharts. -
Upgrade the kagent-crds chart.
helm upgrade kagent-crds oci://ghcr.io/kagent-dev/kagent/helm/kagent-crds \--namespace kagent \--version $NEW_VERSION -
Upgrade the kagent chart. If you made changes to your values, add them with
--setflags or-f values.yaml.helm upgrade kagent oci://ghcr.io/kagent-dev/kagent/helm/kagent \--namespace kagent \-f values.yaml \--version $NEW_VERSION
Verify the upgrade#
After upgrading, verify that kagent is running.
kubectl get pods -n kagent