このページは、まだ日本語ではご利用いただけません。翻訳中です。
Rolling Upgrades
Using DataPlane
This method is only available when running in hybrid mode
To change the image used for your DataPlane
resources, set the spec.deployment.podTemplateSpec.spec.containers[].image
field in your resource:
kubectl edit dataplane dataplane-example -n kong
Once the resource is saved, Kubernetes will perform a rolling upgrade of your Pod
s.
Using GatewayConfiguration
This method is only available when running in DB-less mode
The GatewayConfiguration
API can be used to provide the image and the image version desired for either the ControlPlane
or DataPlane
component of the Gateway
e.g.:
kind: GatewayConfiguration
apiVersion: gateway-operator.konghq.com/v1beta1
metadata:
name: kong
namespace: default
spec:
dataPlaneOptions:
deployment:
podTemplateSpec:
spec:
containers:
- name: proxy
image: kong/kong-gateway:3.8.0.0
controlPlaneOptions:
deployment:
podTemplateSpec:
spec:
containers:
- name: controller
image: kong/kubernetes-ingress-controller:3.3.1
The above configuration will deploy all DataPlane
resources connected to the
GatewayConfiguration
(by way of GatewayClass
) using kong/kong-gateway:3.8.0.0
and any ControlPlane
will be deployed with kong/kubernetes-ingress-controller:3.3.1
.
Given the above, a manual upgrade or downgrade can be performed simply by changing the version.
For example: assuming that at least one Gateway
is currently deployed and running using the above GatewayConfiguration
, an upgrade could be performed by running the following:
kubectl edit gatewayconfiguration kong
And updating the proxy
container image tag in spec.dataPlaneOptions.deployment.podTemplateSpec.spec
to 3.3
like so: kong/kong-gateway:3.3
.
The result will be a replacement Pod
will roll out with the old version and once healthy the old Pod
will be terminated.