4 ms·
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
by fatliverfreddy 2y ago
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.
- zactato 2y agoI should know this, but does K8s actually store objects as a graph internally? Is this doing multiple api calls? How does it perform at scale?
- fatliverfreddy 2y agoK8s 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: `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.