Using the KONG API

We have installed KONG in Docker, now let's use the KONG API and configure your REST API that we are going to expose to consumers. Perform the following steps:

  1. Configure a service in Kong. After installing and starting Kong, use the Admin API on port 8001 to add a new service. Services represent your upstream servers exposing APIs/microservices; let's see the following command:
$ curl -i -X POST   --url http://192.168.99.100:8001/services/   --data 'name=account'   --data 'url=http://192.168.99.100:8181/account/'

Let's see this command on the console as following screenshot:

The preceding screenshot rendered the response ...

Get Mastering Spring Boot 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.