Questions tagged [consul-kv]

The /kv endpoints access Consul's simple key/value store, useful for storing service configuration or other metadata.

It is important to note that each datacenter has its own KV store, and there is no built-in replication between datacenters. If you are interested in replication between datacenters, please view the Consul Replicate project.

Values in the KV store cannot be larger than 512kb.

For multi-key updates, please consider using transaction.

62 questions
1
vote
1 answer

Using Consul for dynamic configuration management

I am working on designing a little project where I need to use Consul to manage application configuration in a dynamic way so that all my app machines can get the configuration at the same time without any inconsistency issue. We are using Consul…
1
vote
2 answers

Not Binding ==> Consul KV + Kotlin Spring Boot @ConfigurationProperties @ConstructorBinding

I need to move our application.yml configurations to Hashicorp's Consul. I've created a simple Spring Boot application to work through the required changes. It loads the configuration data from application.yml to a strongly typed class. However,…
1
vote
1 answer

How to run CONSUL (agent -dev) with predefined key value using bash

I need to start local consul (https://www.consul.io/) using consul agent -dev But by default, this local consul must have some key/value existing. I guess there is a way to do that using REST API... Can someone explain to me? Regards, Nicolas
NicoESIEA
  • 499
  • 1
  • 6
  • 23
1
vote
2 answers

Docker swarm mode, portainer, traefik

i'm trying to setup a webserver into Docker Swarm mode. Any help is appreciated. My idea is to have a single machine configured, to run standalone for now, but ready to scale for load-balance and fault-tollerance purposes. I expect that traefik run…
Sgobbit
  • 11
  • 2
1
vote
1 answer

Not able to load logback.xml from Consul

The issue goes like this I have all my configuration for the project in Consul KV store The configuration includes application.yml, logback.xml and few other configurations needed by my project. Using bootstrap.yml for Spring Cloud Consul…
Nauman Shah
  • 342
  • 2
  • 12
1
vote
3 answers

How do I get the same result of consul kv get -recurse with consul http api?

I want to retrieve all saved keys and values of consul servers using its http api. Or at least how to get all saved keys using http api?
pupil
  • 318
  • 2
  • 16
1
vote
2 answers

Possible to initialise Consul Key Value store at startup?

I can initialise the Consul services at startup using the /consul/config directory. I would like to be able to initialise my application settings into the Consul kv store when I start the Consul container. Is this possible?
David Clarke
  • 12,888
  • 9
  • 86
  • 116
0
votes
0 answers

Curl command appending local system drive path

I am trying to update the value for a key in Consul (Consul key/value pairs) with help of curl command. Here key is School/Class/ClassName and value is /School/class/Seventh The command is: curl -XPUT -d "/School/class/Seventh"…
Srini V
  • 65
  • 1
  • 1
  • 8
0
votes
0 answers

How to get the modify index of a key in consul after setting it?

When I set a key in consul, e.g.: curl -w "\n" -v --request PUT --data value http://127.0.0.1:8500/v1/kv/my-key?cas=1234 How can I get the index for the value I just set? I was surprised to see the response doesn't contain the header X-Consul-Index…
Hesky Fisher
  • 1,145
  • 7
  • 14
0
votes
0 answers

Fetching property which have whitespaces in key from consul

How we can fetch the property which has whitespaces in the key from the consul to Spring Boot application? I am trying to fetch properties that have white spaces in the key and try to store them in a map in Spring Boot application but the…
0
votes
0 answers

Error registering service : Unexpected response code: 400 (Invalid check: TTL must be > 0 for TTL checks)

I want to register my services with multiple script checks for each. I store the values in consul kv and call them with consul-template to write a JSON file as the configuration file to register services with cli “consul services register…
0
votes
1 answer

Terraform and Consul: how to test if values exist/have been changed, and act accordingly

I'm looking for the following experience: User Terraforms my stack. This causes default configuration stanzas to be populated in an according consul KV location, say /app/stackname/config.txt When I upgrade my code, let's say I have a new default…
0
votes
1 answer

Consul: increment a counter in a KV atomically with multiple nodes

I'm using Consul for service discovery and the KV store, with more than 10 nodes. Let's say that each of these nodes has to increment a counter on the same KV, but has to do it atomically. The way I think this should work is the following (using 2…
boston
  • 95
  • 1
  • 7
0
votes
0 answers

How to add ssl certificate to git2consul for private repository?

I am using docker image https://hub.docker.com/r/cimpress/git2consul/ How to add private certificate to git2consul for private repository?
Rahul Ranjan
  • 195
  • 2
  • 11
0
votes
0 answers

How to check consul service health if there is space in the name and tag both

I want to fetch service health information from consul. How can I search a service with curl cmd when there is space in their name and tag both one more question is curl --get http://127.0.0.1:8500/v1/health/checks/$service will check for service…