DBLess Kong | reload configuration

We are trying out the latest DBLess Kong in Kubernetes. And our Kong configuration(Services, Routes etc) is defined in a ConfigMap.

Is there is a way where Kong can reload the configuration when the ConfigMap is edited to add a new service/route?!

Our configuration is very simple and configuring Kong Ingress Controller seems like a overkill.


Hello @cedar715,

Do you mean that you have a ConfigMap holding the content of a kong.yml declarative config file that you would like to be read by Kong (POSTed to /config endpoint in Kong) whenever the ConfigMap is changed?

Sorry for the delay in response Harry @hbagdi !

Yes, the kong.yml is mounted as ConfigMap and yes if there is a change in ConfigMap, I want it to get reloaded in the Kong.

Many thanks!

Hi @hbagdi, can you reply, please?

@cedar715 If you’re using helm, you can easily add an annotation with a sha256 of the configmap which will then roll the deployment automatically.

docs reference

Have you found the answer to this? I was of the impression that kong reload would get the job done, but it doesn’t seem to do the trick. Restarting kong just to reload kong.yml seems wrong.

ok it seems that this can be achieved by passing the .yml file to the admin /config endpoint … https://docs.konghq.com/1.1.x/db-less-and-declarative-config/

Did using the config endpoint work for you? I am trying DB-less kong on Docker and have to restart the whole container for the changes made to configuration to take effect.

It works fine… you just have to make a post request to the admin kong_url:8001/config with the yml config file in the parameter config

1 Like

Yes, you can use the /config endpoint to update the configuration or use a SHA based approach as pointed out by @gfestari.

With Kong 1.2, kong reload will reload the DB-less configuration as well.

1 Like

Hi , how can I pass kong.yml content in /config end point . Do I need to update the kong.yml in mount path before calling the api .


You need to send the YML file as part of the API call to /config:

I did operator from kubernetes that watching changes in any configmap, so when it happen a change the operator looking for deployment that uses this cm and restart the deployment.