I need to use a lot of the Kubernetes API through its Java implementation.
I found that objects are generally very detached and seemingly unrelated, even though they in reality are related.
How do I find the correct relation to a Deployment from a
V1Pod or any of its sub-objects?
How do I find the correct relation to a list of Deployments from a
V1Node or any of its sub-objects?
All I can do is query pods and focus on pods. Or query nodes and focus on nodes. Or query deployments and focus on deployments. As long as this rule is followed, everything is so simple.
However, whenever I try to manifest relations between objects, I have to hack my way through it.
Is there a best practice way of mapping relations between object?
Node -> Deployments
Deployment -> Pods