Based on the information in the knowledge sources, Kong Gateway is supported on Azure Container Apps, but your error indicates a problem connecting to PostgreSQL, which is a common issue during setup. The exit code 1 and failed startup probe typically mean Kong Gateway could not connect to the database successfully.
Here are the most common causes and solutions:
Database Credentials and Configuration
Ensure that the PostgreSQL connection details (host, port, user, password, database name) are correctly set in your environment variables. For example:
These must match the actual credentials and database setup in your PostgreSQL instance. If the password is incorrect, you may see errors like “authentication exchange unsuccessful” or “password authentication failed” Kong Gateway: PostgreSQL authentication error.
PostgreSQL SSL Settings
If your PostgreSQL server requires SSL, you must set KONG_PG_SSL=on and possibly specify the SSL version with KONG_PG_SSL_VERSION=tlsv1_2 or tlsv1_3, depending on your server configuration. Mismatched SSL settings can cause Kong to fail to connect and exit with code 1 Kong Gateway: PostgreSQL SSL error.
pg_hba.conf and Network Access
If you see errors about “no pg_hba.conf entry” or “SSL off”, your PostgreSQL server may be rejecting the connection due to authentication or SSL requirements. Make sure the server allows connections from your Kong Gateway container’s IP and user, and that SSL requirements match your Kong configuration Kong Gateway: pg_hba.conf entry error.
Database User and Permissions
The database and user must exist, and the user must own the database. Example SQL to set up:
CREATE USER kong WITH PASSWORD 'super_secret';
CREATE DATABASE kong OWNER kong;
Double-check your environment variables for database connection.
Ensure the database is reachable from Azure Container Apps (network/firewall).
Check the Kong Gateway logs for the exact error message about PostgreSQL connection.
Adjust SSL settings if your database requires it.
If you can provide the specific error message from the Kong Gateway logs, I can help further pinpoint the issue. If the problem persists after checking these areas, please share the log output for more targeted troubleshooting.