Skip to content

How to import complex YAML structure in etcd #16405

Answered by jmhbnz
irfanjs asked this question in Q&A
Discussion options

You must be logged in to vote

etcd does not have any complex value query features, it is purely a key value store. So you will need to think very carefully about how you structure your keys (they can be nested) versus just storing fully raw documents as values.

If we stick with the example above, and in reference to your question, an alternative structure might be something like

 ~  Documents  etcd  bin   main  ./etcdctl put region/us-east-1/physicalclusters/xyz/lc4/tenant7 hello-tenant-7-details
OK

 ~  Documents  etcd  bin   main  ./etcdctl put region/us-east-1/physicalclusters/xyz/lc4/tenant8 hello-tenant-8-details
OK

We could then retrieve values specific to lc4 or tenant8 as follows using --prefix (re…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@irfanjs
Comment options

@jmhbnz
Comment options

Answer selected by jmhbnz
@irfanjs
Comment options

Comment options

You must be logged in to vote
2 replies
@jmhbnz
Comment options

@irfanjs
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants