I’m using Kong open-source version 3.1 and Deck 1.21. I’m trying to set up the service using the deck conf file, but the deck is deleting the services which are already there and later deck is creating a new service.
Can someone please help with this issue?
Hi @Abhijeet_Pawar ,
It is genuine behavior of deck. If you use deck without any tags, it will delete all existing configurations and create the new ones which are mentioned in the yaml file.
If you want to retain all existing services/routes/consumers/etc. in Kong and want update/create new one, you have to use tags in yaml configuration and deck command. See below example:
Add MY_TEST_API tag in your service/route/etc. and deploy it.
next time when you deploy using deck, mention the tag in the deck commands, as below.
deck diff -s test1.yaml --select-tag MY_TEST_API
deck sync -s test1.yaml --select-tag MY_TEST_API
Thanks a lot, @Sachin_Ghumbre
I tried after adding tags and it’s working.