kubernetes去客户端使用节点和集群的存储 [英] kubernetes go client used storage of nodes and cluster
问题描述
这实际上是两个问题: p>
-
如何对kubernets主机执行http请求?
有关更多详细信息,请参见[1]。您可以至少以3种方式访问apiserver:
a。kubectl get nodes
(不去)
b。kubectl代理
,然后由http客户端转到此网址
c。在kubernetes群集中运行pod -
获取节点统计信息需要做什么?
a。运行kubectl describe节点
,它会显示资源信息。
b。现在运行kubectl describe node --v = 7
,它会显示REST调用。
我也认为你应该根据 https://stackoverflow.com/help/how-to-ask ,所以它反映了你真正想问的问题。
[1] https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/user-guide/accessing-the-cluster.md
I am newbie in Go. I want to get the storage statistics of nodes and cluster in kubernetes using Go code. How i can get the free and used storage of Kubernetes nodes and cluster using Go.
This is actually 2 problems:
How do I perform http requests to the kubernets master?
See [1] for more details. Tl;dr you can access the apiserver in at least 3 ways:
a.kubectl get nodes
(not go)
b.kubectl proxy
, followed by a go http client to this url
c. Running a pod in a kubernetes clusterWhat are the requests I need to do to get node stats?
a. Runkubectl describe node
, it should show you resource information.
b. Now runkubectl describe node --v=7
, it should show you the REST calls.
I also think you should reformat the title of your question per https://stackoverflow.com/help/how-to-ask, so it reflects what you're really asking.
[1] https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/user-guide/accessing-the-cluster.md
这篇关于kubernetes去客户端使用节点和集群的存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!