Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About metric API #23

Closed
clearday4 opened this issue Aug 12, 2020 · 6 comments
Closed

About metric API #23

clearday4 opened this issue Aug 12, 2020 · 6 comments

Comments

@clearday4
Copy link

Do you have a plan to support "apis/metrics.k8s.io/v1beta1" APIs for gathering resources?

@ityuhui
Copy link
Member

ityuhui commented Aug 14, 2020

Hi @clearday4

I think the metrics API support depends on CRD (CustomResourceDefinition) support. So we will not start to support it before CRD is supported.

Thank you for your proposal for the feature. I will append here if there is any further progress.

@brendandburns
Copy link
Contributor

The other option is to implement the generic API similar to what the Java code does here:

https://github.com/kubernetes-client/java/blob/master/util/src/main/java/io/kubernetes/client/util/generic/GenericKubernetesApi.java

I'll see if I have cycles to add that.

@brendandburns
Copy link
Contributor

I've started working on the generic client.

@brendandburns
Copy link
Contributor

The generic client has now merged.

There is an example here:

https://github.com/kubernetes-client/c/blob/master/examples/generic/main.c

You can use
apiGroup: "metrics.k8s.io"
version: "v1beta1",
resourcePlural: "nodes" or "pods"

and the generic client to access metrics.

@clearday4
Copy link
Author

Thank you for kind answer
It will be very helpful for us.

@clearday4
Copy link
Author

closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants