Voiced by Amazon Polly |
Introduction
Kong Gateway has emerged as a powerful and flexible solution in microservices and API management. When deploying Kong Gateway on container orchestration platforms like OpenShift, Helm provides a convenient way to manage and deploy applications. In this blog post, we will explore the process of deploying Kong Gateway on an OpenShift cluster using Helm.
Pioneers in Cloud Consulting & Migration Services
- Reduced infrastructural costs
- Accelerated application deployment
Prerequisites
Before we dive into the deployment process, make sure you have the following prerequisites in place:
- An OpenShift cluster is up and running.
- Helm installed on your local machine.
- Access to the OpenShift cluster with the necessary permissions to create resources.
Setting up Helm
Helm serves as our gateway to orchestrating the deployment of Kong on OpenShift. The initial steps involve installing Helm, initializing it, and adding the Kong Helm repository. This establishes the foundation for managing the lifecycle of Kong Gateway on your OpenShift cluster.
Once Helm is installed, initialize Helm on your local machine and add the Helm chart repository for Kong:
Bash code
1 2 3 |
helm init helm repo add kong https://charts.konghq.com helm repo update |
Deploying Kong Gateway with Helm
With Helm configured, the deployment of Kong Gateway becomes a straightforward process. This section outlines the creation of a dedicated namespace for Kong, installing Kong using Helm, and monitoring the deployment to ensure that all pods are running as expected.
Now that Helm is set up let’s deploy Kong Gateway on our OpenShift cluster:
Create a namespace for Kong:
Bash code
1 |
oc create namespace kong |
Install Kong using Helm:
Bash code
1 |
helm install kong kong/kong --namespace kong |
This command installs Kong in the “Kong” namespace using the Helm chart from the Kong Helm repository. You can customize the installation by specifying values in values.yaml file or using command-line flags.
Monitor the deployment:
Bash code
1 |
oc get pods -n kong |
Wait until all the Kong pods are in the “Running” state before proceeding.
Configuring Kong Gateway
Now that Kong Gateway is deployed, you can configure it based on your specific requirements. Kong supports various configurations, including routing, security, and plugins.
Access the Kong Admin API:
Bash code
1 2 |
export POD_NAME=$(kubectl get pods -n kong -l "app=kong,release=kong" -o jsonpath="{.items[0].metadata.name}") kubectl port-forward -n kong $POD_NAME 8001:8001 |
You can now access the Kong Admin API at http://localhost:8001 and configure routes, services, and plugins.
Configure routes and services:
Use the Kong Admin API or the Konga web UI to define API routes and services. For example:
Bash code
1 2 |
curl -i -X POST --url http://localhost:8001/services/ --data 'name=example-service' --data 'url=http://example.com' curl -i -X POST --url http://localhost:8001/services/example-service/routes --data 'paths[]=/example' |
Explore Kong plugins
Kong supports various plugins to extend its functionality. Explore and configure plugins based on your requirements.
Conclusion
Explore Kong’s documentation for additional configuration options and features to enhance your API management experience.
Drop a query if you have any questions regarding Kong Gateway and we will get back to you quickly.
Making IT Networks Enterprise-ready – Cloud Management Services
- Accelerated cloud migration
- End-to-end view of the cloud environment
About CloudThat
CloudThat is an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.
FAQs
1. Can I deploy Kong Gateway on an existing OpenShift cluster?
ANS: – Yes, you can deploy Kong Gateway on an existing OpenShift cluster. The Helm chart allows for easy installation and management. Ensure that the Helm is configured correctly and follow the deployment steps outlined in the guide.
2. How can I customize Kong Gateway configurations during deployment?
ANS: – Helm provides flexibility using values.yaml file or command-line flags. Create values.yaml file with your custom configurations or pass specific values directly during the Helm installation command. Refer to Kong’s Helm chart documentation for a comprehensive list of configuration options.
3. Are there any security considerations when deploying Kong Gateway on OpenShift?
ANS: – Yes, ensure that you follow OpenShift’s security best practices. Kong Gateway provides various security features, including authentication plugins and rate-limiting capabilities. Always configure Kong with proper security measures based on your organization’s requirements.

WRITTEN BY Rajveer Singh Chouhan
Rajveer works as a Cloud Engineer at CloudThat, specializing in designing, deploying, and managing scalable cloud infrastructure on AWS. He is skilled in various AWS services as well as automation tools like Terraform and CI/CD pipelines. With a strong understanding of cloud architecture best practices, Rajveer focuses on building secure, cost-effective, and highly available solutions. In his free time, he keeps up with the latest advancements in cloud technologies and enjoys exploring infrastructure automation and DevOps tools.
Comments