PodDisruptionBudget

Uses: Kong Gateway Operator
Related Documentation

DataPlane resources can be configured with a PodDisruptionBudget to control:

  • The number or percentage of pods that can be unavailable during maintenance (e.g. rollout).
  • The number or percentage of pods that must be available during maintenance (e.g. rollout).

This is useful to ensure that a certain number or percentage of pods are always available.

See the Specifying a Disruption Budget for your Application guide for more details on the PodDisruptionBudget API itself.

Creating a DataPlane with PodDisruptionBudget

For DataPlane resources, you can define a PodDisruptionBudget in the spec.resources.podDisruptionBudget field.

The DataPlane’s spec.resources.podDisruptionBudget.spec matches the PodDisruptionBudget API, excluding the selector field, which is automatically set by Kong Gateway Operator to match the DataPlane pods.

Example

Here is an example of a DataPlane resource with a PodDisruptionBudget:

apiVersion: gateway-operator.konghq.com/v1beta1
kind: DataPlane
metadata:
  name: dataplane-with-pdb
spec:
  resources:
    podDisruptionBudget:
      spec:
        maxUnavailable: 1
  deployment:
    replicas: 3
    podTemplateSpec:
      spec:
        containers:
        - name: proxy
          image: kong/kong-gateway:3.10

If you leave the resources.podDisruptionBudget field empty, Kong Gateway Operator will not create a PodDisruptionBudget for the DataPlane.

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!