Blog
  • AI Gateway
  • AI Security
  • AIOps
  • API Security
  • API Gateway
    • API Management
    • API Development
    • API Design
    • Automation
    • Service Mesh
    • Insomnia
    • View All Blogs
  1. Home
  2. Blog
  3. Engineering
  4. Configuring a Kubernetes Application on Kong Konnect
Engineering
July 2, 2021
4 min read

Configuring a Kubernetes Application on Kong Konnect

Viktor Gamov
Topics
KubernetesKong KonnectApplications
Share on Social

More on this topic

eBooks

Hybrid API Gateway Clusters With Kong Konnect and Amazon Elastic Kubernetes Service

eBooks

The Difference Between API Gateways and Kubernetes Ingress

See Kong in action

Accelerate deployments, reduce vulnerabilities, and gain real-time visibility. 

Get a Demo

Hello, everyone! Viktor Gamov, a developer advocate with Kong here. In this article, I would like to show you how to set up service connectivity using Kong Konnect and Kubernetes. I will deploy an application in Kubernetes, configure a runtime through Konnect and demonstrate some management capabilities like enabling plugins.

Let's dive right in!

Set Up Konnect, Kubernetes and Helm

As a prerequisite, I have created an account set up in Konnect. If you don't already have one, you can sign up for free and follow our getting started documentation, blog post or video.

Also, I have prepared my three-node Kubernetes cluster in GCP.

Kong Konnect Kubernetes Ingress Controller Pods


I also have Helm 3 installed on my computer.

Helm 3 Installation

Kong provides you with Helm Charts for Kong Gateway and Ingress Controller.

Follow this documentation to add the Kong repository to your computer.


Next, we'll securely establish a connection between our control plane and our data plane. To do this, click Generate Certificate in the Runtimes section of Konnect.

You need to copy the certificate, root certificate and server private key to your files system.

We will deploy those to Kubernetes in a few steps.

Kong Konnect and Kubernetes Deployment: Generate Certificate

Connect the Runtime in Kubernetes

Next, we should connect the runtime to our data plane. Then, we need to create secrets inside our Kubernetes cluster. One secret for the Kong cluster certificate and the other for the Kong cluster certificate code. There's more detail on this in the Kong Konnect documentation.

Note: Make sure you've created the namespace.


The next thing we'll need is the values.yaml file.

We can put all our customizations for Kong Helm Charts.

In case you are interested in customizing this installation, take a look at a repository of examples. In your case, it might contain different links because you might be using different URLs.


Apply the values.yaml file.

To get Helm access to Kong, we need to get the external IP address. For example, when creating a service with a load balancer in Google Cloud, Google Cloud will provide us with an external address. So to communicate with our application service, we need this address.


Next, let's make sure we have a connection to this runtime in Konnect and K9s.

It's connected in my Konnect Runtime Manager.

Kong Konnect Runtime Manager

Here's my pod in K9s. It's connected to my control plane.

Kong Service in K9s Pod


Now we have our data plane, our applications are running and our API gateway is running. Next, we need to manage this API gateway from the outside world.

Create the Mock Service in Konnect

We'll create a new service in Konnect ServiceHub called mock service. I'm creating a service that will proxy the request to this Mockbin through my Kong Gateway.

Kong Konnect: Create a New Service

To create a new implementation, we'll go into our current version for the mock service and click Add New Implementation.

Kong Konnect: Create a New Implementation

Kong Konnect: Create a New Route

From Mockbin, we can try testing with foo and bar (http://mockbin.com/request?foo=bar&foo=baz), and I get the following response.


If we try to hit the same URL through Kong, we'll see some extra headers.

Kong Hit Mock URL in Insomnia


We should also be able to see this traffic in our Konnect Vitals data. I just hit once, so there's one spike.

Kong Konnect Vitals Traffic


So far, in the Konnect UI, we configured a mock service. That configuration propagated into our data plane that deployed in Kubernetes. We didn’t configure anything in Kubernetes, but suddenly our Kong Gateway service running inside Kubernetes started understanding the mock URL.

Configure the Service in Kubernetes

I wrote a small application called Quote Service that shows random quotes from Back to the Future. Once the application deploys, we’ll create the port forwarding. Then, once port forwarding is enabled, we’ll get responses from the service.

Kubernetes Service Port Forwarding with Kong

We'll hit this Kubernetes service through service discovery. So this Quote Service is now available on port 8080.

Kubernetes Services


We'll go back to Konnect and create a new service and implementation again.

Kong Konnect: Create Kubernetes Service

Kong Konnect: Create Kubernetes Service Implementation


We'll add the route.

Kong Konnect: Add Kubernetes Route


When we hit this now, it immediately goes through our Kong Ingress Controller. That's because the communication between the Konnect control plane and the data plane in Kubernetes is super fast.

Enable a Rate Limiting Policy

If we continue hitting this with requests on repeat, we should see that in the Konnect Vitals graph.

Kong Konnect Vitals: Kubernetes Service Requests

What should we do in real life to prevent this type of situation? That's where rate limiting policies come in.


We can quickly enable Kong's rate limiting plugin. Let's allow one request per second.

Kong Konnect Set Rate Limiting Config Limit

Kong Konnect: Rate Limiting Plugin Configure Policy

Kong Konnect: Rate Limiting Configure Second


If we start getting too many requests, our mock service will push back with a 429.

Insomnia Test Rate Limiting: Too Many Requests 429 Error


And in Kong Vitals, we should be able to see errors in red.

Kong Konnect Vitals: Traffic Status Code

Set Up a Request Validator Policy

Another thing we could do is enable Kong's request validator plugin.

Kong Konnect: Configure Request Validator Plugin


When our application starts getting bad requests, we'll get a Bad Request that says, “request body doesn’t conform to the schema.”

However, when I enter the magic_word, the application works as it should.

Insomnia Test Request Validator Plugin


All of these plugins are on the runtime and don't require changing the application service. I think that’s pretty powerful.

Ready to Try Out Kong Konnect?

Start a free trial, or contact us if you have any questions as you're getting set up.

Once you've set up Kong Konnect and Kubernetes, you may find these other tutorials helpful:

  • Automating Your Developer Pipeline With APIOps (DevOps + GitOps)
  • Service Design Guidelines Part 2: API Versioning
  • "Gateway Mode" in Kuma and Kong Mesh

Topics
KubernetesKong KonnectApplications
Share on Social
Viktor Gamov

Recommended posts

Kong Mesh 2.12: SPIFFE/SPIRE Support and Consistent XDS Resource Names

Kong Logo
Product ReleasesSeptember 18, 2025

We're very excited to announce Kong Mesh 2.12 to the world! Kong Mesh 2.12 delivers two very important features: SPIFFE / SPIRE support, which provides enterprise-class workload identity and trust models for your mesh, as well as a consistent Kuma R

Justin Davies

Unlocking API Analytics for Product Managers

Kong Logo
EngineeringSeptember 9, 2025

Meet Emily. She’s an API product manager at ACME, Inc., an ecommerce company that runs on dozens of APIs. One morning, her team lead asks a simple question: “Who’s our top API consumer, and which of your APIs are causing the most issues right now?”

Christian Heidenreich

Kong Acquires OpenMeter to Bring API and AI Monetization to the Agentic Era

Kong Logo
NewsSeptember 3, 2025

Today, we’re announcing that Kong has acquired  OpenMeter , the open source and SaaS leader for real-time usage metering and billing. OpenMeter’s capabilities will be integrated into Kong Konnect, enabling usage-based pricing, entitlements, and invo

Saju Pillai

Announcing terraform-provider-konnect v3

Kong Logo
Product ReleasesAugust 22, 2025

It’s been almost a year since we released our  Konnect Terraform provider . In that time we’ve seen over 300,000 installs, have 1.7 times as many resources available, and have expanded the provider to include data sources to enable federated managem

Michael Heap

How to Build a Multi-LLM AI Agent with Kong AI Gateway and LangGraph

Kong Logo
EngineeringJuly 31, 2025

In the last two parts of this series, we discussed How to Strengthen a ReAct AI Agent with Kong AI Gateway and How to Build a Single-LLM AI Agent with Kong AI Gateway and LangGraph . In this third and final part, we're going to evolve the AI Agen

Claudio Acquaviva

How to Build a Single LLM AI Agent with Kong AI Gateway and LangGraph

Kong Logo
EngineeringJuly 24, 2025

In my previous post, we discussed how we can implement a basic AI Agent with Kong AI Gateway. In part two of this series, we're going to review LangGraph fundamentals, rewrite the AI Agent and explore how Kong AI Gateway can be used to protect an LLM

Claudio Acquaviva

Announcing Kubernetes Ingress Controller 3.5

Kong Logo
Product ReleasesJuly 17, 2025

We're happy to announce the 3.5 release of Kong Ingress Controller (KIC).  This release includes the graduation of combined services to General Availability, support for connection draining, as well as the start of deprecating support for some Ingre

Justin Davies

Ready to see Kong in action?

Get a personalized walkthrough of Kong's platform tailored to your architecture, use cases, and scale requirements.

Get a Demo
Powering the API world

Increase developer productivity, security, and performance at scale with the unified platform for API management, AI gateways, service mesh, and ingress controller.

Sign up for Kong newsletter

Platform
Kong KonnectKong GatewayKong AI GatewayKong InsomniaDeveloper PortalGateway ManagerCloud GatewayGet a Demo
Explore More
Open Banking API SolutionsAPI Governance SolutionsIstio API Gateway IntegrationKubernetes API ManagementAPI Gateway: Build vs BuyKong vs PostmanKong vs MuleSoftKong vs Apigee
Documentation
Kong Konnect DocsKong Gateway DocsKong Mesh DocsKong AI GatewayKong Insomnia DocsKong Plugin Hub
Open Source
Kong GatewayKumaInsomniaKong Community
Company
About KongCustomersCareersPressEventsContactPricing
  • Terms•
  • Privacy•
  • Trust and Compliance•
  • © Kong Inc. 2025