This method is only available when running in KIC 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
. For example:
kind: GatewayConfiguration
apiVersion: gateway-operator.konghq.com/v1alpha1
metadata:
name: kong
namespace: default
spec:
dataPlaneOptions:
deployment:
podTemplateSpec:
spec:
containers:
- name: proxy
image: kong/kong-gateway:3.10
controlPlaneOptions:
deployment:
podTemplateSpec:
spec:
containers:
- name: controller
image: kong/kubernetes-ingress-controller:
The above configuration will deploy all DataPlane
resources connected to the
GatewayConfiguration
(by way of GatewayClass
) using kong/kong-gateway:3.10
and any ControlPlane
will be deployed with kong/kubernetes-ingress-controller:
.
Given the above, a manual upgrade or downgrade can be performed 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.4
like so: kong/kong-gateway:3.4
.
The result will be a replacement Pod
that will roll out with the old version, and once healthy the old Pod
will be terminated.