Meta description: Understand Kong's core objects by connecting a REST API to the gateway and exploring the Kong Manager UI.
What you'll learn
What Services, Routes and Consumers are, and how they relate
How to publish an API through Kong
How to use Kong Manager
A sample REST API
You need a backend to forward to. Any REST API works. Here, assume a small API called alpha running at http://alpha:8080 on the same Docker network as Kong, with an endpoint GET /hello .
The three core objects
Client β [ Route: "which requests?" ] β [ Service: "where to?" ] β your API β Consumer: "who is calling?"
Enter fullscreen mode
Exit fullscreen mode
1. Service: where the traffic goes
A Service describes your backend: protocol, host, port and path.
curl -i -X POST http://localhost:8001/services \ --data name = alpha-service \ --data url = http://alpha:8080
Enter fullscreen mode
Exit fullscreen mode
Nobody can reach it yet. A Service only describes the destination.
2.β¦