Setup Kong Gateway on MacOS

oneIAM
2 min readOct 4, 2022

--

Kong Gateway required persistent storage to store data such as Routes and Services. It provides two options to install namely: Using a database and Without a database. This tutorial primarily focused on the “Using a database” option. Kong Gateway supports two types of databases Postgres and Cassandra. But Cassandra support is already deprecated and eventually it will be removed from Kong Gateway 4.0 release.

Step 01: Install PostgreSQL according to your operating system.

psql -U postgres -h localhost

Step 02: Create a user “kong” as the owner of database “kong”. Change the password of user kong.

Step 03: Install Kong Gateway on Mac

brew tap kong/kong

brew install kong

Step 04: Download default configuration file (kong.conf.default) from [1] and copy the file to location /etc

sudo mkdir -p /etc/kong

sudo cp kong.conf.default /etc/kong/kong.conf

Step 05: Modify the content of kong.conf as below to connect with Postgres database

Step 06: Bootstrap configuration

kong migration bootstrap -c /etc/kong/kong.conf

Step 07: Start Kong Gateway

kong start -c /etc/kong/kong.conf

Verify that Kong Gateway is running. For more information refer [2].

curl -i http://localhost:8001/

References

[1] https://raw.githubusercontent.com/Kong/kong/master/kong.conf.default

[2] https://docs.konghq.com/gateway/latest/install/macos/

--

--

oneIAM
oneIAM

Written by oneIAM

One-stop solution for all your enterprise identity and access management requirements

Responses (1)