我目前正在做一些基于这个link的测试
在这一步之前,一切都运行良好:http://localhost:8001/api/v1/proxy/namespaces/default/pods/(leader-pod-name):4040/
访问此链接时收到错误:
kind "Status"
apiVersion "v1"
metadata {}
status "Failure"
message "pods \"leader-elector-5f456c7b49-4rdd6:4040\" not found"
reason "NotFound"
details
name "leader-elector-5f456c7b49-4rdd6:4040"
kind "pods"
code 404格式有什么问题吗?
注意:我可以在访问pod时获得pod leader (通过kubectl exec -it ...)并使用"curl localhost:4040“
发布于 2019-04-23 22:30:04
只需使用URL:http://localhost:8001/api/v1/namespaces/default/pods/<leader-pod-name>:4040/proxy即可通过Kubernetes API到达目标Pod上的proxy端口。查找有用的教程here。
https://stackoverflow.com/questions/55806562
复制相似问题