Upgrade a Data Plane Node to a New Version
Self-managed data plane nodes can be upgraded to a new Kong Gateway by initializing new nodes before decommissioning old ones. This method ensures high availability, allowing the new node to commence data processing prior to the removal of the old node. Managed nodes are upgraded automatically after selecting the new version of Kong Gateway.
We recommend running one major version (2.x or 3.x) of a data plane node per control plane, unless you are in the middle of version upgrades to the data plane. Mixing versions may cause compatibility issues.
Note: If you don’t want to manually upgrade data plane nodes, you can use a Dedicated Cloud Gateway. With cloud gateways, Kong fully-manages the data plane and handles upgrades for you.
Prerequisites
Read through the Kong Gateway upgrade considerations for the version that you’re upgrading to.
Upgrade a data plane node
To upgrade a data plane node to a new version, follow these steps:
Dedicated Cloud Gateways
Hybrid-mode
- In Gateway Manager, select the Dedicated Cloud Gateways powered control plane you want to upgrade the data plane nodes for.
- From the Actions menu, select Edit or Resize Cluster.
- Select the desired Kong Gateway version, and click Update Cluster.
Konnect will upgrade the version of all the data plane nodes to the version you selected automatically.
Kong performs a rolling upgrade of the fully-managed data plane nodes. This is a zero downtime upgrade because Kong synchronizes the data plane with load balancer registration and de-registration and gracefully terminates the old data plane nodes to reduce the impact on the ongoing traffic.
Using the control-plane-id
for the data plane group you want to upgrade, you can upgrade via the API by following these steps:
-
Send a GET request to the /cloud-gateway/networks/
endpoint, the response will contain a list of all the active Cloud Gateway networks.
curl --request GET \
--url https://us.api.konghq.com/v2/cloud-gateways/networks \
--header 'Authorization: Bearer kpat_iIGUb6bPml2G6WUSPnZMLdty6pwgUf8GIJbSlBlasg6w4y1cS'
- From the response body save the
cloud_gaetway_network_id
, control_plane_id
.
-
Construct and send a POST request to /cloud-gateways/configurations
, using both the control_plane_id
, cloud_gateway_network_id
, and the desired version
:
curl --request PUT \
--url https://{region}.api.konghq.com/v2/cloud-gateways/configurations \
--header 'Authorization: Bearer BEARER_TOKEN' \
--data '{
"control_plane_id": "CONTROL_PLANE_ID",
"version": "DESIRED_VERSION",
"control_plane_geo": "GEO_LOCATION",
"dataplane_groups": [
{
"provider": "aws",
"region": "REGION",
"cloud_gateway_network_id": "CLOUD_GATEWAY_NETWORK_ID",
"autoscale": {
"kind": "autopilot",
"base_rps": 100
}
}
]
}'
Replace BEARER_TOKEN
, CONTROL_PLANE_ID
, DESIRED_VERSION
, GEO_LOCATION
, REGION
, and CLOUD_GATEWAY_NETWORK_ID
with your specific details.
Konnect will upgrade the version of all the data plane nodes to the version you selected automatically, the response body will contain information about the data plane group, including the version.
Kong performs a rolling upgrade of the fully-managed data plane nodes. This is a zero downtime upgrade because Kong synchronizes the data plane with load balancer registration and de-registration and gracefully terminates the old data plane nodes to reduce the impact on the ongoing traffic.
-
Open Gateway Manager, choose a control plane,
and provision a new data plane node through the Gateway Manager.
Make sure that your new data plane node appears in the list of nodes,
displays a Connected status, and that it was last seen Just Now.
-
Once the new data plane node is connected and functioning, disconnect
and shut down the nodes you are replacing.
You can’t shut down data plane nodes from within Gateway Manager. Old
nodes will also remain listed as Connected
in Gateway Manager for a
few hours after they have been removed or shut down.
-
Test passing data through your new data plane node by accessing your proxy
URL.
For example, with the hostname localhost
and the route path /mock
:
http://localhost:8000/mock