I've not use the KV provider before. But I think I managed to replicate?
I got it working first try then I tried to break it by removing the root. It was okay. It updated.
I then recreated the KV(using the consul UI). But this time instead of creating the key http/services/whoami/loadbalancer/servers/0/url
I created a 'folder' http/services/whoami/
I then got the:
{"level":"error","msg":"KV connection error: field not found, node: , retrying in 2.847896791s","providerName":"consul","time":"2021-04-29T16:59:10Z"}
Looking at the KV tree it looks like the provider does not handle a null value in the service name. It might be a similar issue with yours.
I could reproduce this in the routers tree also.
erroring KV tree
curl -sq localhost:8500/v1/kv/traefik?recurse=true | jq '.[] | {key: .Key, value: .Value|@base64d}'
{
"key": "traefik/",
"value": "��"
}
{
"key": "traefik/http/routers/kv/rule",
"value": "PathPrefix(`/whoami`)"
}
{
"key": "traefik/http/routers/kv/service",
"value": "whoami"
}
{
"key": "traefik/http/services/",
"value": "��"
}
{
"key": "traefik/http/services/whoami/",
"value": "��"
}
{
"key": "traefik/http/services/whoami/loadbalancer/servers/0/url",
"value": "http://172.21.0.2"
}
OK KV tree
curl -sq localhost:8500/v1/kv/traefik?recurse=true | jq '.[] | {key: .Key, value: .Value|@base64d}'
{
"key": "traefik/",
"value": "��"
}
{
"key": "traefik/http/routers/kv/rule",
"value": "PathPrefix(`/whoami`)"
}
{
"key": "traefik/http/routers/kv/service",
"value": "whoami"
}
{
"key": "traefik/http/services/whoami/loadbalancer/servers/0/url",
"value": "http://172.21.0.2"
}