kubectl proxy初体验 有更新!

  |   0 评论   |   22 浏览

kubectl proxy

让外部网络访问K8S service的ClusterIP

# kubectl proxy
Starting to serve on 127.0.0.1:8001


# kubectl proxy --address='0.0.0.0' --accept-hosts='^*$'
Starting to serve on [::]:8001

结果

curl -s localhost:8001 | head
{
  "paths": [
    "/api",
    "/api/v1",
    "/apis",
    "/apis/",
    "/apis/admissionregistration.k8s.io",
    "/apis/admissionregistration.k8s.io/v1beta1",
    "/apis/apiextensions.k8s.io",
    "/apis/apiextensions.k8s.io/v1beta1",

评论

发表评论