You are browsing documentation for an older version. See the latest documentation here.
Customizing the Data Plane image
You can customize the image of your DataPlane
using the DataPlane
resource or the GatewayConfiguration
CRD .
Using DataPlane
This method is only available when running in hybrid mode
The DataPlane
resource uses the Kubernetes PodTemplateSpec to define how the Pods should run.
apiVersion: gateway-operator.konghq.com/v1beta1
kind: DataPlane
metadata:
name: dataplane-example
namespace: kong
spec:
deployment:
podTemplateSpec:
spec:
containers:
- name: proxy
image: kong/kong-gateway:3.8.1.0
Using GatewayConfiguration
This method is only available when running in DB-less mode
The GatewayConfiguration
resource is a Kong-specific API which allows you to set both controlPlaneOptions
and dataPlaneOptions
.
You can customize both the container image and version.
-
Define the image in the
GatewayConfiguration
.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.8.1.0 controlPlaneOptions: deployment: podTemplateSpec: spec: containers: - name: controller image: kong/kubernetes-ingress-controller:3.3.1
-
Reference this configuration in the
GatewayClass
resource for the deployment.kind: GatewayClass apiVersion: gateway.networking.k8s.io/v1 metadata: name: kong spec: controllerName: konghq.com/gateway-operator parametersRef: group: gateway-operator.konghq.com kind: GatewayConfiguration name: kong namespace: default
-
Use the
GatewayClass
in yourGateway
.kind: Gateway apiVersion: gateway.networking.k8s.io/v1 metadata: name: kong namespace: default spec: gatewayClassName: kong listeners: - name: http protocol: HTTP port: 80