Kong ofrece una herramienta de gestión de configuración de código abierto (escrita en Go), llamada decK, que significa declarative Kong en inglés.
- Comprobar que deck reconoce vuestra instalación de Kong Gateway mediante deck gateway ping
deck gateway ping
Successfully connected to Kong!
Kong version: 3.4.3.11
- Exportar la configuración de Kong Gateway a un archivo llamado "kong.yaml" mediante el comando deck gateway dump
deck gateway dump -o kong.yaml
- Después de modificar direcciones IP en el archivo kong.yaml, se muestran las diferencias mediante deck gateway diff
deck gateway diff kong.yaml
updating service test-iris {
"connect_timeout": 60000,
"enabled": true,
- "host": "192.168.65.1",
+ "host": "172.24.156.176",
"id": "8fc9849d-9e61-402d-bcad-c3e611808892",
"name": "test-iris",
"port": 9092,
"protocol": "http",
"read_timeout": 60000,
"retries": 5,
"write_timeout": 60000
} updating service uct {
"connect_timeout": 60000,
"enabled": true,
- "host": "192.168.65.1",
+ "host": "172.24.156.176",
"id": "96ad587e-8921-4d6c-acb7-3f7f7a7cc072",
"name": "uct",
"path": "/api/uct/",
"port": 9092,
"protocol": "http",
"read_timeout": 60000,
"retries": 5,
"write_timeout": 60000
} Summary:
Created: 0
Updated: 2
Deleted: 0
deck gateway sync kong.yaml
updating service uct {
"connect_timeout": 60000,
"enabled": true,
- "host": "192.168.65.1",
+ "host": "172.24.156.176",
"id": "96ad587e-8921-4d6c-acb7-3f7f7a7cc072",
"name": "uct",
"path": "/api/uct/",
"port": 9092,
"protocol": "http",
"read_timeout": 60000,
"retries": 5,
"write_timeout": 60000
} updating service test-iris {
"connect_timeout": 60000,
"enabled": true,
- "host": "192.168.65.1",
+ "host": "172.24.156.176",
"id": "8fc9849d-9e61-402d-bcad-c3e611808892",
"name": "test-iris",
"port": 9092,
"protocol": "http",
"read_timeout": 60000,
"retries": 5,
"write_timeout": 60000
} Summary:
Created: 0
Updated: 2
Deleted: 0
deck gateway dump --workspace workspace1
deck gateway sync workspace1.yaml --workspace workspace1
Para más información:
https://docs.konghq.com/deck/get-started
https://docs.konghq.com/deck/reference/faq/
https://github.com/Kong/deck/blob/main/CHANGELOG.md/