KrakenD: How to Deploy to Kubernetes
Sample steps to deploy KrakenD to Kubernetes
Recently, I was looking for a free and open-source API Gateway and I found KrakenD, an ultra-performant open-source Gateway that can transform, aggregate, or remove data from multiple services, with linear scalability.
KrakenD needs no programming and offers a declarative way to create the endpoints. It is well structured and layered and open to extending its functionality using plug-and-play middleware developed by the community or in-house.
As such, I decided to give KrakenD a try. For my first article on KrakenD, I will be focusing on how to deploy KrakenD to Kubernetes.
Okteto: Free Managed Kubernetes Cluster
Deploy free managed Kubernetes cluster for learning and development purposes.
How to Deploy to Kubernetes
To deploy to Kubernetes, we will need 3 files:
We are using ConfigMap to store our KrakenD configuration (
krakend.json) and later mount it at
/etc/config/krakend in the deployment.
To find out more about how to configure, you may refer to the following links below:
- Configuration overview: https://www.krakend.io/docs/enterprise/configuration/overview/
- Endpoint configuration: https://www.krakend.io/docs/enterprise/endpoints/creating-endpoints/
- Backend configuration: https://www.krakend.io/docs/enterprise/backends/overview/
The official image used in this deployment.yml is devopsfaith/krakend:1.4.1-alpine (latest as of 13 Feb 2022)
And there we have it. I hope you have found this useful. Thank you for reading. If you enjoyed this article, remember to follow me for more updates!
Stay tuned for more articles ✌️.
If you are not a Medium member yet and want to become one, click here.
Join Medium with my referral link — Wei Kang
As a Medium member, a portion of your membership fee goes to writers you read, and you get full access to every story…