consul-demo-traffic-splitting
consul-demo-traffic-splitting copied to clipboard
invalid config key "Expose"
Getting this error when trying to run through the traffic-splitting demo.
Steps to reproduce:
- docker-compose up
- After the services {web, web-sidecar-proxy, api (v1), api-sidecar-proxy (v1), consul} are up and running, I try to deploy the configuration entries.
- I start by deploying the
service-defaultsconfiguration entry.
Error message:
$ consul config write l7_config/api_service_defaults.json
Error writing config entry service-defaults/api: Unexpected response code: 400 (Bad request: Request decoding failed: 1 error occurred:
* invalid config key "Expose"
)
NOTE: I am able to write the service-resolver configuration entry, however I see this error with service-defaults configuration entry.
Version:
SM-smahajan628:consul-demo-traffic-splitting smahajan$ consul --version
Consul v1.9.5
Revision 3c1c22679
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
ping @nicholasjackson @judithpatudith
Thanks for reporting this! I work on Terraform now but @karl-cardenas-coding can probably find someone to help out 😄
@judithpatudith Thanks! Also, adding @Blake since he is helping me out on an internal (Roblox) slack channel.
Looks like the demo repo is using an older consul version consul 1.6.1
Inside the consul container:
/ # consul version
Consul v1.6.1
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
Can we update this to the current version 1.9.5?
@judithpatudith Looks like if I update consul container to consul 1.9.5 (current version) the issue goes away.
I updated the consul version to 1.9.5 here
Followed by:
1. docker-compose build
2. docker-compose up
$ docker exec -it d9415843f1ac /bin/sh
/ # consul version
Consul v1.9.5
Revision 3c1c22679
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
/ # exit
$ consul config write l7_config/api_service_defaults.json
Config entry written: service-defaults/api
I am closing this issue. You (or whoever is maintaining the repo) might wanna update your consul version to >=1.9.5 🙂
Other users might run into same issue.
@judithpatudith @karl-cardenas-coding
Looks like the issue is not fully resolved, and the envoy container images in the repo also needs to be updated?
I am going to reopen the issue for now. And once the images in the repo are updated. I can give it another shot, validate the fix and we can then close the issue.
@eddie-rowe
Updating the consol-envoy docker image in the two docker-compose files, combined with @shishir-a412ed's changes worked for me:
- image: nicholasjackson/consul-envoy:v1.6.1-v0.10.0
+ image: nicholasjackson/consul-envoy:v1.9.2-v1.16.0
@ashconnor Can you link to the tutorial where you encountered this please?
@karl-cardenas-coding - This one https://learn.hashicorp.com/tutorials/consul/service-mesh-traffic-splitting