Prepare to Administer Kong Gateway
Before getting started with using Kong Gateway, verify that it was installed correctly, and that you’re ready to administer it.
Before you begin
Before you start this section, make sure that:
- Kong Gateway is installed and running.
- Kong Manager (if applicable) and Kong Admin API ports are listening on the appropriate port/IP/DNS settings.
- If using declarative configuration to configure Kong Gateway, decK is installed.
In this guide, an instance of Kong Gateway is referenced via <admin-hostname>
. Make sure to replace <admin-hostname>
with the hostname of your control plane instance.
Verify the Kong Gateway configuration
Using Kong Manager
Using the Admin API
Using decK (YAML)
As a Kong Gateway user, you can use Kong Manager for environment administration. You’re going to use it later on in this guide, so first make s ure you can access Kong Manager.
Open a web browser and navigate to http://<admin-hostname>:8002
.
If Kong Gateway was installed correctly, it automatically logs you in and presents the Kong Manager Overview page.
Ensure that you can send requests to the gateway’s Admin API using either cURL or HTTPie.
View the current configuration by issuing the following command in a terminal window:
cURL
HTTPie
curl -i -X GET http://<admin-hostname>:8001
http <admin-hostname>:8001
The current configuration returns.
Check that decK is connected to Kong Gateway:
deck ping
You should see a success message with the version that you’re connected to:
Successfully connected to Kong!
Kong version: 2.1.0
Ensure that you can pull configuration from Kong Gateway by issuing the following command in a terminal window:
deck dump
This command creates a
kong.yaml
file with the gateway’s entire current configuration, in the directory where decK is installed.You can also use this command at any time (for example, after a
deck sync
) to see the Kong Gateway’s most recent configuration.Be careful! Any subsequent
deck dump
will overwrite the existingkong.yaml
file. Create backups as needed.Open the file in your preferred code editor. Since you haven’t configured anything yet, the file should only contain the decK version:
_format_version: "1.1"
You will use this file to configure Kong Gateway.
(Optional) Verify Control Plane and Data Plane connection
If you’re running Kong Gateway in hybrid mode, you need to perform all tasks in this guide from the control plane. You can check that all of your configurations are being pushed from the control plane to your data planes using the Cluster Status CLI.
Run the following from a control plane:
cURL
HTTPie
curl -i -X GET http://<admin-hostname>:8001/clustering/data-planes
http :8001/clustering/data-planes
The output shows all of the connected data plane instances in the cluster:
{
"data": [
{
"config_hash": "a9a166c59873245db8f1a747ba9a80a7",
"hostname": "data-plane-2",
"id": "ed58ac85-dba6-4946-999d-e8b5071607d4",
"ip": "192.168.10.3",
"last_seen": 1580623199,
"status": "connected"
},
{
"config_hash": "a9a166c59873245db8f1a747ba9a80a7",
"hostname": "data-plane-1",
"id": "ed58ac85-dba6-4946-999d-e8b5071607d4",
"ip": "192.168.10.4",
"last_seen": 1580623200,
"status": "connected"
}
],
"next": null
}
Summary and next steps
In this section, you learned about the methods of administering Kong Gateway and how to access its configuration. Next, go on to learn about exposing your services with Kong Gateway.