Prepare to Administer Kong Gateway
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 . Make sure to replace <admin-hostname>
with the hostname of your control plane instance.
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.
View the current configuration by issuing the following command in a terminal window:
cURL
HTTPie
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:
Ensure that you can pull configuration from Kong Gateway by issuing the following command in a terminal window:
This command creates a
kong.yaml
file with the gateway’s entire current configuration, in the directory where decK is installed.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.
If you’re running Kong Gateway in Hybrid mode, you will need to perform all tasks in this guide from the Control Plane. However, 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 on a Control Plane:
cURL
HTTPie
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,
},
"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