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 a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.
CloudThat is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, AWS Training Partner, AWS Migration Partner, AWS Data and Analytics Partner, AWS DevOps Competency Partner, Amazon QuickSight Service Delivery Partner, Amazon EKS Service Delivery Partner, Microsoft Gold Partner, AWS Microsoft Workload Partners, Amazon EC2 Service Delivery Partner, and many more.
To get started, go through our Consultancy page and Managed Services Package, CloudThat’s offerings.
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 Singh Chouhan works as a Research Associate at CloudThat. He has been learning and gaining practical experience in AWS and Azure. Rajveer is also passionate about continuously expanding his skill set and knowledge base by actively seeking opportunities to learn new skills. Rajveer regularly reads blogs and articles related to various programming languages, technologies, and industry trends to stay up to date with the latest developments in the field.
Click to Comment