Kubernetes uses etcd as the persistent store for API data. As etcd is a distributed key-value store, we can also use command line tools to query this store. The examples in this post are for OpenShift 3.x.
Apart from just using
get, there is also the possibility to perform the following actions on certain keys:
putto write to a key – unless you know what you are doing, don’t touch the Kubernetes data in etcd, as this will manifest in very strange Kubernetes behaviour.
delto delete a key – also, this may break your Kubernetes cluster by introducing inconsistencies.
watchto keep a watch on an object. This is very helpful to track changes on a certain object.
get action is probably the most helpful functionality for in-depth API debugging directly within etcd.