Skip to content

How to get List of APIGroups using client java api , expecting similar output as fabric8 client #4102

@swagata-sahoo

Description

@swagata-sahoo

Describe the bug
We are trying to get the list of APIGROUPS using client java but we are not able to achieve it . Earlier we are using fabric8 client java ,with using this we were able to fetch the list of APIGROUPS.

We have tried the solution provided as part of #4003 .
We are getting below output when we have used it .

       ApiClient client = Configuration.getDefaultApiClient();
        Configuration.setDefaultApiClient(client);
        Discovery discovery = new Discovery(client);
        V1APIGroupList list = discovery.groupDiscovery("/apis");

Output of list of API group :

output_discovery_APIgrouplist.txt

But with fabric8 we are getting below output

output_fabric8_APIgrouplist.txt

We are expecting similar output with java client api as well . Can you please check and help on this .

Client Version
21.0.1

Kubernetes Version
v1.30.2

Java Version
Java 17

Expected behavior
We are trying to fetch the list of APIGROUPS using client java api
KubeConfig
If applicable, add a KubeConfig file with secrets redacted.

Server (please complete the following information):

  • OS: [e.g. Linux]
  • Environment [e.g. container]
  • Cloud [e.g. Azure]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions