Learn a new language to unlock the power of the Kubernetes graph.
Query multiple resource kinds and compose custom JSON payloads
Express complex CRUD operations in a compact, effective new way.
Full-featured interactive shell includes completion, syntax highlighting, resource graph visualization in ASCII-art and more.
K8s does not store any graph model internally.
The relationship engine in Cyphernetes is comparing fields that should either match/contain all/etc. between two resources - for example a ResplicaSet's .metadata.ownerReferences[].name matches a Deployment's .metadata.name, or a Deployment's .metadata.labels contains all of a Service's spec.selector.
These rules are used both to read the resources but also for creating them. Each rule may also contain a set of default properties which are used in create operations - for instance:
Will create a clusterIp Service (similar to what `kubectl expose` does).
Doing this with kubectl or programmatically without tuning for rate limiting, implementing caching etc. of course fails even at a very small scale - Cyphernetes has its own request throttling and caching layer to make this possible.
I personally am a fan of Cypher and a Cypher-inspired language to describe graph operations in Kubernetes had been a dream of mine for several years until I eventually mustered the courage to create it myself.
I just think it’s a great fit, much more than SQL!
I’m aware picking up a new language will be a barrier for most to pick it up, and that’s fine.
In any case I think this is an interesting tool worth sharing and I hope to find a few more that will be into it, who knows!
While doing the research for this tool I did however come across two projects that do exactly what you describe:
9 comments
[ 2.6 ms ] story [ 31.8 ms ] threadFull-featured interactive shell includes completion, syntax highlighting, resource graph visualization in ASCII-art and more.
Is this doing multiple api calls? How does it perform at scale?
These rules are used both to read the resources but also for creating them. Each rule may also contain a set of default properties which are used in create operations - for instance:
`MATCH (d:Deployment {name: "nginx"}) CREATE (d)->(s:Service)`
Will create a clusterIp Service (similar to what `kubectl expose` does).
Doing this with kubectl or programmatically without tuning for rate limiting, implementing caching etc. of course fails even at a very small scale - Cyphernetes has its own request throttling and caching layer to make this possible.
While doing the research for this tool I did however come across two projects that do exactly what you describe:
kubeql: https://github.com/saracen/kubeql kubesql: https://github.com/xuxinkun/kubesql
I’m not sure if either graduated past doing read operations, and both aren’t maintained anymore.