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.
git clone -b HC4.1-kong https://gitlab.expertflow.com/cim/cim-solution.git
Create the namespace using command
kubectl create namespace kong
change to the directory
cd cim-solution/kubernetes/
Edit Helm File
You will need to update the helm file for kong before proceeding with the install
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
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
helm upgrade --install=true --namespace=kong kong external/kong/
Check the status of external components
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
cd cim-solution/kubernetes/cim/Ingresses
Now change the FQDN to your own
sed -i 's/devops[0-9]*.ef.com/<FQDN>/g' kong/*
Applying Ingresses
kubectl apply -f kong/
Konga
An open source tool that enables you to manage your Kong API Gateway with ease.
cd cim-solution/kubernetes/
Deployment of Kong
helm upgrade --install=true --namespace=kong konga external/konga/
Edit the service for it to exposed externally
kubectl patch svc konga -n kong --type='json' -p '[{"op":"replace","path":"/spec/type","value":"NodePort"}]'
The external port will appear as following
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