Kong Gateway is one of the most famous API Gateways in the Cloud Native world. It's used to manage the lifecycle of APIs and micro-services. API Gateways can do- Rate limiting, securing Your API with Key and tokens, logging and many more.
In this context, we shall look into how to install Kong API Gateway on Ubuntu 20.04.
How to install Kong API Gateway on Ubuntu ?
To begin, we will download Kong API Gateway package by running the following command:
$ curl -Lo kong.2.5.0.amd64.deb "https://download.konghq.com/gateway-2.x-ubuntu-$(lsb_release -cs)/pool/all/k/kong/kong_2.5.0_amd64.deb"
Then, install the deb file by dpkg command:
$ sudo dpkg -i kong.2.5.0.amd64.deb
Here, we will not use a database (Kong will run in the DB-less mode). Run the following command to generate the config file for Kong:
$ kong config init
A config file name kong.yml will be created after running the above command. Let’s edit the kong.yml file as follow:
database = off
How to Run Kong API ?
To start Kong, you can simply run the following command:
$ kong start -c kong.yml
To verify that Kong is running:
$ curl -i http://localhost:8001