I am using the go discovery client pkg (k8s.io/client-go/discovery, v0.22.2) to list all supported resources in a cluster ->
discoveryClient, err := discovery.NewDiscoveryClientForConfig(GetK8sConfig())
if err != nil {
// do something
}
resourceList, err := discoveryClient.ServerPreferredResources()
When I run this code I get the following error ->
I1213 09:19:15.932915 38142 request.go:665] Waited for 1.008601388s due to client-side throttling, not priority and fairness, request: GET:https://35.225.61.23/apis/scheduling.k8s.io/v1beta1?timeout=32s
Now, I don't mind the error, what bothers me is that I can't prevent this error from being printed.
Any idea how to stop the discovery client from sending errors to the stderr?