kubeclient
kubeclient copied to clipboard
Kubectl top pod not available
it would be helpful to add top command in kubeclient to check pod level resource usage
Can you run kubectl with --loglevel=11 to see what requests it does to gather the info?
Try this:
kubectl = Kubeclient::Client.new (
'https://kubernetes.default.svc/apis/metrics.k8s.io',
'v1beta1',
auth_options: auth_options,
ssl_options: ssl_options
)
kubectl.get_nodes
One gotcha that just got me stuck for a while was for whatever reason, the get_entity method for get_node isn't generated. To get a single node by name, you have to do this:
kubectl.get_entity('nodes', '10.0.0.1')
Whoa, now that is interesting!