如何在 kubernetes 的 pod 中获取 node 的 hostname

请问如何在 k8s 的 pod 中获取所在 node 服务器的主机名?

回答

这个一般是启动pod时,通过环境变量传给 pod的

以上是如何在 kubernetes 的 pod 中获取 node 的 hostname的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>