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

    1. http <admin-hostname>:8001

    The current configuration returns.

    1. Check that decK is connected to Kong Gateway:

      1. deck ping

      You should see a success message with the version that you’re connected to:

    2. 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 existing kong.yaml file. Create backups as needed.

      1. Open the file in your preferred code editor. Since you haven’t configured anything yet, the file should only contain the decK version:

        1. _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:

      1. {
      2. "data": [
      3. {
      4. "config_hash": "a9a166c59873245db8f1a747ba9a80a7",
      5. "hostname": "data-plane-2",
      6. "id": "ed58ac85-dba6-4946-999d-e8b5071607d4",
      7. "ip": "192.168.10.3",
      8. "last_seen": 1580623199,
      9. },
      10. "config_hash": "a9a166c59873245db8f1a747ba9a80a7",
      11. "hostname": "data-plane-1",
      12. "id": "ed58ac85-dba6-4946-999d-e8b5071607d4",
      13. "ip": "192.168.10.4",
      14. "last_seen": 1580623200,
      15. "status": "connected"
      16. }
      17. ],
      18. "next": null