Ingress Controller with Kong, Alternative way Ingress instead Nginx

Setup Kong as ingress Controller

Btech Engineering
btech-engineering
3 min readNov 2, 2022

--

Ingress With Kong

What Is Kong

Kong is one of API Gateway platform for managing API gateway and Microservice mesh. Kong offer service as open-source (Community Edition) or Enterprise. With Kong we can manage communication between client and Microservice using API. Not only about API gateway and microservice mesh, Kong can be used as Ingress Controller in Kubernetes cluster. It we’ll discuss in this article.

What is Ingress

“Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.”

Ingress Controller

Ingress with Kong

Why use Kong as ingress controller?

  • Popular cloud-native API Gateway
  • Open sourced in 2015; Apache-2.0
  • Built in top of the official NGINX k8s ingress controller
  • Kong 2.0 (latest 2.1.3)
  • Enhanced API management using plugin
  • Health Checking And Load Balancing
  • Authentication
  • Etc

How?

Kong Ingress Controller configures Kong using Ingress resources created inside a Kubernetes cluster.

Kong Ingress Controller is made up of two components:

  • Kong, the core proxy that handles all the traffic
  • Controller, a process that syncs the configuration from Kubernetes to Kong

Kong Ingress Controller performs more than just proxying the traffic coming into a Kubernetes cluster. It is possible to configure plugins, load balancing, health checking and leverage all that Kong offers in a standalone installation.

Kong is designed around an extensible plugin architecture and comes with a wide variety of plugins already bundled inside it. These plugins can be used to modify the request/response or impose restrictions on the traffic. You can link Kongplugin to Ingress, service or Kongconsumer.

Demo

Deployment app on Kubernetes using echo server, for manifest you can find at here. And deployment Kong as Ingress Controller Using Helm 3. Make sure that you have installed helm3 on your bastion/host.

Skenario

Installation

Create Namespace

Install Kong using Helm Chart

Export IP_PROXY as env variable

Deploy Sample App

Deploy echo server

Create Basic Proxy

Test Proxy

Kong Plugin

Create Ingress Rule with Plugin

Test

Rate Limit

Test

What’s Next?

In the next article we’ll share about implementation Kong as API Gateway Solution for gateway communication between end-user such as Frontend App or Mobile App and Microservice Mesh using API Centric. Stay tune …

By Sulaiman, Ops Team Btech

Our Tagline

#ContinuousLearning

Reference

Sulaiman Google Slides

--

--

Btech Engineering
btech-engineering

Our mission is continuous learning and remember together is better.