Javarevisited
Published in

Javarevisited

KrakenD: How to Deploy to Kubernetes

Sample steps to deploy KrakenD to Kubernetes

KrakenD Medium

Introduction

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.

How to Deploy to Kubernetes

To deploy to Kubernetes, we will need 3 files:

  • config.yml
  • deployment.yml
  • service.yml

config.yml

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:

deployment.yml

The official image used in this deployment.yml is devopsfaith/krakend:1.4.1-alpine (latest as of 13 Feb 2022)

service.yml

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.

References:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Wei Kang

Wei Kang

Once a programmer, always a programmer