02 Upgrading Kong Gateway
02 Upgrading Kong Gateway
CONNECTIVITY COMPANY
Kong Gateway additionally has one more decimal point on the right which identifies a
sub-patch based on the Kong Community Gateway.
The upgrade path for major and minor versions differs depending on the version from which
you are migrating.
For example:
Always consult release notes for any additional, release specific, migration steps
Kong Gateway can be upgraded in-place and also supports a zero downtime migration model.
This means that while the migration is in process, you have two Kong clusters with different
versions running that are sharing the same database. This is sometimes referred to as the
blue-green migration model.
The migrations are designed so that there is no need to fully copy the data:
● The new version of Kong Gateway is able to use the data as it is migrated, and
● The old Kong cluster keeps working until it is finally time to decommission it.
For this reason, the full migration is split into two stages:
To set up your lab environment for this lesson, run the 'setup' command, then select option '2'
$ setup
1) Kong Gateway Installation
2) Upgrading Kong Gateway
3) Securing Kong Gateway
4) Securing Services on Kong
5) OIDC Plugin
6) Kong Vitals
7) Advanced Plugins Review
8) Troubleshooting
9) Reset Virtual Machine
10) Quit
Please select the lesson you wish to set up: 2
In the following lab we will upgrade Kong API Gateway on Docker from Kong 2.5 to 2.6.
This is a minor upgrade, and the exercise will incur a brief downtime.
We will offer the lab exercise for both Docker CLI and Docker compose
● Docker Compose allows you to try more complex scenarios more easily, such as
incremental and/or hybrid upgrades with start/upgrade releases of your choice.
2 migrations processed
1 executed
1 pending
1 migration processed
1 executed
No pending migrations to finish
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 515
Content-Type: application/json
Date: Mon, 17 Apr 2023 10:39:15 GMT
Server: gunicorn/19.9.0
Via: kong/2.6.0.1-enterprise-edition
X-Kong-Proxy-Latency: 81
X-Kong-Upstream-Latency: 83
Using compose greatly simplifies the process. An additional service can be added to
the compose file to handle the migrations up and migrations finish like this:
kong-migrations-up:
image: "${KONG_DOCKER_TAG:-kong:latest}"
command: kong migrations up && kong migrations finish
depends_on:
- db
networks:
- kong-net
"kong-ee : 2.5.1.2-enterprise-edition"
$ export KONG_VERSION="2.6.0.1-alpine"
$ docker-compose -f kongupgdemo.yaml up -d
HTTP/1.1 200 OK
Via: kong/2.6.0.1-enterprise-edition
However please note that this compose file was put together for hybrid mode, which
was introduced in 2.1, so that compose file will not work with anything earlier than 2.1
as starting point.
If you use a compose file for a traditional mode install, you will not have that
limitation, and can start the upgrade from earlier versions of the Kong Gateway.
● If currently using the Developer Portal in 1.5.x, manual migration of its files to version
2.1.x is required.
In this lesson we