Skip to main content
Skip table of contents

KONG & KONGA Deployment

Introduction

This document illustrates the procedure and steps to deploy Kong & Konga on any Kubernetes distribution (K3s or RKE2). Kong API, also known as Kong API Gateway, is an open-source API gateway and microservices management platform. It acts as a centralized point of control for managing and securing APIs, allowing organizations to efficiently expose, manage, and secure their APIs.

Kubernetes must be running on the system with Helm

Deployment:

Start with cloning the repository from gitlab.
CODE
git clone -b HC4.1-kong  https://gitlab.expertflow.com/cim/cim-solution.git

Create the namespace using command

CODE
kubectl create namespace kong

change to the directory 

CODE
cd cim-solution/kubernetes/

Edit Helm File

You will need to update the helm file for kong before proceeding with the install

CODE
vi external/kong/values.yaml

The following changes need to be made to the hostname on the proxy ingress on the kong's value file

CODE
proxy:
  # Enable creating a Kubernetes service for the proxy
  enabled: true
  type: LoadBalancer
  loadBalancerClass:
  # Override proxy Service name
  nameOverride: ""
  # To specify annotations or labels for the proxy service, add them to the respective
  # "annotations" or "labels" dictionaries below.
  annotations: {}
....   ingress:
# Enable/disable exposure using ingress.
enabled: false
ingressClassName:
# Ingress hostname
# TLS secret name.
# tls: kong-proxy.example.com-tls
hostname: <FQDN>
# Map of ingress annotations.
annotations: {}
# Ingress path.
path: /
# Each path in an Ingress is required to have a corresponding path type. (ImplementationSpecific/Exact/Prefix)
pathType: ImplementationSpecific

# Optionally specify a static load balancer IP.
# loadBalancerIP:

Change the hostname's FQDN in proxy ingress section to your own.

Install Kong

CODE
helm upgrade --install=true --namespace=kong  kong external/kong/

Check the status of external components 

CODE
kubectl get pods -n kong
NAME                              READY   STATUS      RESTARTS   AGE
kong-postgresql-0                 1/1     Running     0          3d
kong-kong-init-migrations-nmctf   0/1     Completed   0          3d
kong-kong-6df7d87d49-ts77g        2/2     Running     0          3d

change to the directory for the Ingresses

CODE
cd cim-solution/kubernetes/cim/Ingresses

Now change the FQDN to your own

CODE
sed -i 's/devops[0-9]*.ef.com/<FQDN>/g' kong/*  


Applying Ingresses

CODE
kubectl apply -f kong/

Konga

An open source tool that enables you to manage your Kong API Gateway with ease.

CODE
cd cim-solution/kubernetes/

Deployment of Kong

CODE
helm upgrade --install=true --namespace=kong  konga external/konga/

Edit the service for it to exposed externally

CODE
kubectl patch svc konga -n kong  --type='json' -p '[{"op":"replace","path":"/spec/type","value":"NodePort"}]'

The external port will appear as following

CODE
kubectl get svc -n konga
NAME    TYPE       CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
konga   NodePort   10.43.53.157   <none>        80:30344/TCP   59m

The dashboard can be accessed based on the port results above

To setup the dashboard access it using the following format http://<fqdn>:<nodeport>

Konga Dashboard


Setup your credentials and login to Konga

Create a new connection to connect Konga to your Kong 

Connection Panel


For Kong admin URL enter your Kong admin cluster IP and Port and create connection




JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.