Join our Newsletter — 33% off our NHI Course

Kong Migrations

Kong migrations are database changes used to move a Kong Gateway deployment between software versions. They prepare the schema for both current and newer instances during an upgrade, which is why backup, validation, and controlled traffic shifting matter during the process.

What Kong migrations are for

Kong migrations are the schema changes that let a Kong Gateway deployment move safely between versions. They prepare the database for both the running release and the target release, so the upgrade can proceed without breaking compatibility or data integrity.

That makes migrations a deployment control, not just a database task. The important question is whether the schema change preserves the gateway’s ability to start, route traffic, and validate state while two software versions may briefly coexist during the upgrade window.

In practice, migrations are part of the upgrade path because Kong’s control plane and runtime behaviour depend on schema readiness. If the database is not prepared correctly, the upgrade can fail late, or worse, succeed partially and leave the gateway in an inconsistent state.

Why version transitions need controlled sequencing

The main operational challenge is that a gateway upgrade is usually not a single atomic switch. Schema evolution has to be ordered so the old version can still read the database while the new version can also work against it, which is why controlled sequencing matters.

This is the same general failure pattern seen in many production systems: application code and database schema must remain compatible across a transition. When that compatibility is not maintained, operators can see failed starts, configuration errors, or behaviour that looks correct until traffic hits an unsupported path.

For Kong migrations, the upgrade process needs to account for rollback expectations, data durability, and timing of traffic cutover. Even if the schema change itself is small, the operational dependency is large because the gateway is sitting on the path of live API traffic.

What can go wrong during a Kong upgrade

The biggest risks are schema drift, incomplete migration execution, and starting a newer or older instance against a database that is not at the expected state. Those failures can interrupt API traffic, block admin operations, or leave part of the deployment unable to initialise.

Backup and validation are essential because database changes during platform upgrades are hard to unwind once live traffic depends on them. A controlled migration plan reduces the chance that a recoverable upgrade turns into a service outage or a prolonged rollback problem.

Where migration steps are skipped or rushed, the blast radius is usually broader than the database itself. The gateway may still appear present, but routing, plugin behaviour, or startup checks can become unstable until the schema and binaries are aligned again.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
CIS Controls v8 CIS Control 4 — Secure Configuration of Enterprise Assets and Software Kong migrations are part of controlled software configuration changes during upgrade.
CIS Control 11 — Data Recovery Migrations change database state, making backup and recovery readiness central to the upgrade.
CIS Control 16 — Application Software Security Schema transitions during application upgrades must preserve application compatibility and integrity.
Recommendation — Validate upgrade sequencing and configuration states before promoting the new Kong version. Confirm recoverability before applying Kong schema migrations or cutover. Test Kong upgrade paths so schema changes remain compatible with the running application.
NIST CSF 2.0 PR.IP — Information Protection Processes and Procedures Controlled migration and validation are part of disciplined change and release procedures.
RC.RP — Recovery Planning Backup and rollback readiness are directly tied to safe migration execution.
Recommendation — Document and follow the approved Kong migration sequence during each upgrade. Prepare and test recovery steps before running Kong migrations in production.

Practitioner Guidance

Why practitioners should care: Treat Kong migrations as a release-engineering dependency, not a routine maintenance step. The practical risk is not the SQL change alone, but the upgrade state in which schema, binaries, and live traffic must remain compatible.

What to watch for: Pay attention to version-specific migration order, backup timing, and whether rollback is actually supported for the exact upgrade path. If the database state is ambiguous, pause the cutover rather than assume the gateway will self-correct.

Practitioner takeaway: A safe Kong upgrade is the product of schema readiness, validation, and traffic sequencing working together, not of the migration command by itself.