kubernetes-client
kubernetes-client copied to clipboard
How to list nodes?
Hello!
Thanks for the scala library.
How can I list the nodes of the cluster? There's KubernetesClient.pods
but no KubernetesClient.nodes
.
With the java kubernetes client I can call api.listNode(null, false, null, null, null, 10, null, null, null, false)
, which is really ugly but gets the nodes.
I'm newbie to the library and to Cats, and I don't even know how to list pods. There is no doc.
It doesn't seem possible :( There are other Scala libraries Kubernetes like skuber
Hi @TheElectronWill, It is indeed not supported (contribution welcome 🙂).
@DavidPerezIngeniero More doc would be nice but I personally don't have much time for it. I believe code and tests should somewhat give documentation.
Cats has top notch documentation to me.
For this project what people do is they create a KubernetesClient
and then from the client write a dot .
and let your IDE drive you.
For example listing pods is as easy as:
kubernetesClient.pods.list()
Use Idea between .
offer the possibilities and choose the one that suits you.
If any operations like listing nodes
was offered, as @TheElectronWill mentioned it would be under kubernetesClient.nodes.list()
.
Thanks