# Does DB-less Kong auto-sync with k8s ingress?

**URL:** <https://discuss.konghq.com/t/does-db-less-kong-auto-sync-with-k8s-ingress/4581>\
**Category:** Questions\
**Created:** [October 7, 2019, 7:43pm UTC](https://discuss.konghq.com/t/does-db-less-kong-auto-sync-with-k8s-ingress/4581 "2019-10-07T19:43:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![reloaded](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@reloaded](https://discuss.konghq.com/u/reloaded)\
**Post date:** [October 7, 2019, 7:43pm UTC](https://discuss.konghq.com/t/does-db-less-kong-auto-sync-with-k8s-ingress/4581/1 "2019-10-07T19:43:49Z")

</div>

Hello,

I’ve setup a Postgres backed Kong and it automatically creates all Kong routes, upstreams and services based on the k8s ingresses resources it ingests automatically… Does this behavior remain the same when in DB-less mode or do I have to specify all routes, upstreams and services manually?

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [October 7, 2019, 8:59pm UTC](https://discuss.konghq.com/t/does-db-less-kong-auto-sync-with-k8s-ingress/4581/2 "2019-10-07T20:59:59Z")

</div>

It remains the same as long as you have Ingress Controller running along with it.

The data instead of being persisted in the database, it is persisted in-memory by Kong.

There is no change in configuration apart from running Kong itself in in-memory mode.

---

<div class="post-metadata">

**Author:** ![reloaded](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@reloaded](https://discuss.konghq.com/u/reloaded)\
**Post date:** [October 8, 2019, 10:07pm UTC](https://discuss.konghq.com/t/does-db-less-kong-auto-sync-with-k8s-ingress/4581/3 "2019-10-08T22:07:46Z")

</div>

@hbagdi Thank you for getting back to me.

> [@hbagdi](#):
>
> It remains the same as long as you have Ingress Controller running along with it.

That contradicts what you said in this other discussion thread 14 days ago regarding DB-less Kong and Prometheus. My understanding of what you mentioned there is that if the ingress controller is activated it will transition Kong into “DB mode” thus turning off “DB-less” Kong.

> [@Kong's Prometheus plugin not returning all metrics](https://discuss.konghq.com/t/kongs-prometheus-plugin-not-returning-all-metrics/4477/2):
>
> You shouldn’t be using Ingress Controller and dbless configuration at the same time. The DB-less configuration (dblessConfig) will be replaced by Kong Ingress Controller. Please create a CRD KongPlugin with name and plugin set to Prometheus. Have a look at the following guide: [https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/guides/prometheus-grafana.md](https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/guides/prometheus-grafana.md)

but now you’re saying if I activate the ingress controllers with a DB-less kong (env.database = “off”) that Kong will continue to run in memory only mode yet it will watch the kube ingress resources and automatically configure itself?

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [October 15, 2019, 8:58pm UTC](https://discuss.konghq.com/t/does-db-less-kong-auto-sync-with-k8s-ingress/4581/4 "2019-10-15T20:58:20Z")

</div>

> [@reloaded](#):
>
> Kong will continue to run in memory only mode yet it will watch the kube ingress resources and automatically configure itself?

Yes.  
In the DB-less mode, the configuration will be populated based on k8s resources like Ingress, KongPlugins etc.

In the DB mode, it is possible for configuration from k8s to co-exist with configuration from Admin API.

Having said that, you should not be configuring Kong via two methods usually.  
Either stick to Admin API or stick to using Kubernetes resources to configure it.
