0

I am using kubernetes python client and I want to write a method to list/get custom objects like VirtualMachine or VirtualMachineInstance. I tried with the method client.CustomObjectsApi().list_cluster_custom_object() but it requires 3 necessary parameters, group, version and plural. I tried with the same method for kubevirt object and I got the expected result. But for the case of VirtualMachine or VirtualMachineInstance, I am not sure what should be the plural parameter. I tried different keywords using hit and trial method but failed to get any output.

I am not sure what I am getting wrong here. Either the VirtualMachine/VirtualMachineInstance aren't custom objects or there is something else I am getting all wrong together. Can someone please help me here?

  • You probably need to generate a python client library from the OpenAPI declared by the Custom Resource. – Jonas May 17 '21 at 14:04
  • I checked with the Kubevirt python client library, but when I tried to execute some code I got Error 111 - connection refused. Any idea about this? – Yash May 17 '21 at 17:18
  • did you try this: https://stackoverflow.com/a/72017508/4160072 – Mohammed May 09 '22 at 01:27

0 Answers0