Kubernetes fabric8 Java API - How to list StorageClass objects

199 views Asked by At

Is there a way to list the Kubernetes StorageClass objects using the fabric8 Java API?

3

There are 3 answers

0
Swarup Donepudi On

fabric8 kubernetes-client does not support StorageClass yet. This is an open issue on fabric8 kubernetes-client https://github.com/fabric8io/kubernetes-client/issues/869

This issue is again dependent on the support for StoageClass in fabric8 kubernetes-model https://github.com/fabric8io/kubernetes-model/issues/226

Both issues are in "open" status. You can watch for those issues and update the maven dependency version in your pom.xml and use it. Hope this helps.

0
iocanel On

No, I am afraid that atm this is not possible.

Raised:

https://github.com/fabric8io/kubernetes-model/issues/226

and

https://github.com/fabric8io/kubernetes-client/issues/869

so that we can keep track of it.

0
Piyush G On

fabric8-Kubernetes Client supports StorageClass from latest release v3.1.10.

You can use the following to get the list of Storage Class

StorageClassList storageClassList = client.storageClasses().list();

Thanks