Visualize Your Kong API Gateway Clusters With KongMap

yes!nteractive
The Startup
Published in
5 min readOct 21, 2020

Browser-based tool allows for visual mapping and declarative management of Kong Open Source and Enterprise API Gateway Clusters

KongMap provides a view of your Kong Cluster configuration in a single pane

A picture is worth a thousand… configurations.

KongMap is a new free Docker based tool that allows you to quickly see your whole Kong API Gateway configuration in an interactive map through a web browser. No more combing through yaml based declarative config files or making API calls or stringing together Admin GUI clicks to make a mental map of your current gateway configuration. CLI’s are great, but sometimes it is just nice to be able visually see your gateway configuration relationships. KongMap offers an alternative way to view and manage your Kong Gateways.

KongMap provides a single pane view of your Kong Cluster showing all of your gateway API Endpoints (Routes) and the upstream proxied targets (Services) they are connected with. Polices (Plugins) such as authentication, rate limiting, caching and more can be toggled in and out of view. Hovering over or clicking into any node in the map will bring up details for that node, whether it be a route, service, plugin, or workspace (workspaces are only shown when connected to a Kong Enterprise cluster). When connected to a Kong Enterprise Cluster, every node has a direct link to view itself in Kong Manager (The Kong Enterprise Edition Admin GUI). KongMap is a good compliment to what is available and not-available in the Kong Enterprise UI, Kong Manager and Open Source UI alternatives such as Konga. KongMap provides the ability to toggle between multiple Kong clusters, whether they be Kong Open Source, Kong Enterprise, DB or DB-less cluster configurations, or Kong for Kubernetes (Kong’s Ingress Controller for Kubernetes).

Endpoint Analyzer

A really helpful feature beyond the map view is the Endpoint Analyzer. Clicking on an endpoint node will reveal the ‘Analyze Endpoint’ button.

The Analyzer will walk you through the details of any particular endpoint including detailed configuration of the Kong Route, the order of execution and details of plugins/policies as well as the full details of the attached/proxied Service. If connected to a Kong Enterprise Cluster, then a direct link to the element on Kong Manager is provided.

Endpoint Analyzer showing the details of the dad_jokes service attached to /jokes2 endpoint.

Declarative Configuration Interface

A powerful feature of KongMap is its ability to view, export, and manage Kong Gateway configurations in a declarative manner, rather than managing configurations via API calls or DB driven Admin GUI’s. More and more frequently, Kong admins are moving towards declarative operational management of Kong Gateways for a variety of reasons:

  • reduced number of dependencies: no need to manage or rely on a database installation for operations
  • makes a good fit for automation in CI/CD scenarios: configuration for entities can be kept in a single source of truth managed via a Git repository and are highly transportable
  • flexibility: it enables more deployment options for Kong and operational option when considering things like high availability, version control, life cycle management, etc.

Under the hood, KongMap utilizes Kong’s declarative CLI tool decK (https://github.com/Kong/deck) to pull and push new declarative configurations to Kong. The button to launch the declarative configuration interface is displayed when the Kong Cluster node (for Kong Open Source) or the Kong workspace node (Kong Enterprise) is clicked upon.

Once launched, the declarative UI displays the current gateway configuration in YAML format. Here you can view, edit, export, copy and paste your Kong declarative configurations. This feature is helpful when you want to move Kong configurations from one cluster to another (such as moving a Kong DB-less configuration to a Kong Enterprise Workspace for example).

Configurations can be made read-only by KongMap configuration during startup for a particular cluster. Saving declarative configurations is supported whether your Kong cluster is DB-based or DB-less and supports both Kong Open Source and Kong Enterprise. While helpful to view the configuration, it is recommended to only view Kong for Kubernetes / Kong Ingress Controller instances in Read-Only Mode as configurations should provided by the Ingress Controller within Kubernetes itself.

Give It A Try

Installing and running KongMap in Docker takes seconds. Installation instructions can be found here:
https://github.com/yesinteractive/kong-map

Only thing you require is a running Kong Cluster to connect to. If this is your first time venturing down the declarative configuration management options within Kong, here is a sample Kong declarative file you can try with KongMap that uses the DadJokes.Online JSON service and creates a ‘/jokes’ route and employs a rate limit policy: dadjokes.yaml

Even if you are not planning on managing your Kong Clusters declaratively, the ability to quickly get a visual confirmation of the current configuration of your Kong Gateway in one view or jump in and see all the working parts of an API endpoint is rather useful.

Helpful Resources

KongMap GitHub to learn more, ask questions or provide feedback: https://github.com/yesinteractive/kong-map

Kong Declarative Configuration Reference: https://docs.konghq.com/2.1.x/db-less-and-declarative-config/

Kong API Gateway Installation:
https://konghq.com/get-started/#install

Dadjokes.Online Microservice:
https://github.com/yesinteractive/dad-jokes_microservice

--

--

yes!nteractive
The Startup

Technology Enthusiast, Entrepreneur, Software Engineer, Pro Bono Skier