Upgrade
You can use this guide to upgrade the version of kgateway for your control plane and data plane components, or to apply changes to the components’ configuration settings.
Upgrade
-
Set the version to upgrade kgateway in an environment variable, such as the latest patch version (
2.1.1) .export NEW_VERSION=2.1.1 -
Apply the kgateway CRDs for the upgrade version by using Helm.
-
Optional: To check the CRDs locally, download the CRDs to a
helmdirectory.helm template --version v$NEW_VERSION kgateway-crds oci://cr.kgateway.dev/kgateway-dev/charts/kgateway-crds --output-dir ./helm -
Upgrade the CRDs in your cluster:
helm upgrade -i --namespace kgateway-system --version v$NEW_VERSION kgateway-crds oci://cr.kgateway.dev/kgateway-dev/charts/kgateway-crds
-
-
Make any changes to your Helm values.
-
Get the Helm values file for your current version.
helm get values kgateway -n kgateway-system -o yaml > values.yaml open values.yaml -
Compare your current Helm chart values with the version that you want to upgrade to.
-
Show all values:
helm show values oci://cr.kgateway.dev/kgateway-dev/charts/kgateway --version v$NEW_VERSION -
Get a file with all values: You can get a
kgateway/values.yamlfile for the upgrade version by pulling and inspecting the Helm chart locally.helm pull oci://cr.kgateway.dev/kgateway-dev/charts/kgateway --version v$NEW_VERSION tar -xvf kgateway-v$NEW_VERSION.tgz open kgateway/values.yaml
-
-
Make any changes that you want by editing your
values.yamlHelm values file or preparing the--setflags. For development v2.2.0-main builds, include thecontroller.image.pullPolicy=Alwayssetting or refer to the exact image digest to avoid using cached images.
-
-
Upgrade the kgateway Helm installation.
- Make sure to include your Helm values when you upgrade either as a configuration file or with
--setflags. Otherwise, any previous custom values that you set might be overwritten. - When using the development build v2.2.0-main, add the
--set controller.image.pullPolicy=Alwaysoption to ensure you get the latest image. Alternatively, you can specify the exact image digest.- To use experimental Gateway API features, include the experimental feature gate,
--set controller.extraEnv.KGW_ENABLE_GATEWAY_API_EXPERIMENTAL_FEATURES=true.
- Make sure to keep the agentgateway feature flag,
--set agentgateway.enabled=true.
- To use experimental Gateway API features, include the experimental feature gate,
helm upgrade -i -n kgateway-system kgateway oci://cr.kgateway.dev/kgateway-dev/charts/kgateway \ -f values.yaml \ --version v$NEW_VERSION - Make sure to include your Helm values when you upgrade either as a configuration file or with
-
Verify that kgateway runs the upgraded version.
kubectl -n kgateway-system get pod -l app.kubernetes.io/name=kgateway -o jsonpath='{.items[0].spec.containers[0].image}'Example output:
cr.kgateway.dev/kgateway-dev/kgateway:2.1.1 -
Confirm that the kgateway control plane is up and running.
kubectl get pods -n kgateway-system