I wrote a little Go program that connects to etcd hosts http://192.168.0.210:2379
and http://192.168.0.211:2379
, sets a key /foo
to bar
and then reads it and prints the result. That part is working fine:
bar &{get {Key: /foo, CreatedIndex: 6, ModifiedIndex: 6, TTL: 0} <nil> 6 67b31bc85ffd6d2b} <nil>
the key can also be read using a HTTP GET request
{
"action": "get",
"node": {
"key": "/foo",
"value": "bar",
"modifiedIndex": 6,
"createdIndex": 6
}
}
but when I use ectdctl it returns nothing as if the key didn't exist
./etcdctl --endpoints=192.168.0.210:2379,192.168.0.211:2379 get /foo
if I instead set /foo
using etcdctl, then it works and reads the key correctly. It looks like etcdctl is working on a workspace of its own. Any ideas why this is happening?