k8s api调用示例
2022-01-12 17:39 方斌 阅读(247) 评论(0) 编辑 收藏 举报参考:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#list-pod-v1-core
根据deployment(test12345678)查询pod
/api/v1/namespaces/default/pods?labelSelector=k8s-app in (test12345678)
根据主机查询pod
/api/v1/namespaces/default/pods?selector=status.hostIP=主机IP