Having an issue where when I changed the datacenter name to use1 from america, the k8s-sync node is persisting with the name “america” when I check the nodes in consul catalog nodes. However, when I do consul catalog datacenters, it only displays use1 and euw1 (my other dc). I tried restarting consul-catalog-sync and it didn’t do anything or remove the node. I can’t seem to get prepared query templating working because all my services live in this orphaned dc, and can’t restart the node due it to being k8s itself (127.0.0.1)
Hello!
It looks like this happens because we create the k8s-sync
synthetic node without explicitly defining the datacenter here which means that it takes on the default value of the agent’s datacenter.
However, we don’t recommend changing the datacenter name once it’s been created because it’s not supported in Consul (see Consul issue 1858).
Could you tell us a bit more about your use case that requires a datacenter name change?