What's the purpose of the default kubernetes service?

后端 未结 2 1798
醉酒成梦
醉酒成梦 2021-02-07 18:58

When you run: kubectl get svc -n default, you will have a kubernetes service with Type as ClusterIP already there.

What is the purpose of this service? Any

2条回答
  •  悲哀的现实
    2021-02-07 19:22

    AFAIK the kubernetes service in the default namespace is a service which forwards requests to the Kubernetes master ( Typically kubernetes API server).

    So all the requests to the kubernetes.default service from the cluster will be routed to the configured Endpoint IP. In this scenario its the kubernetes master IP

    For example

    Lets checkout the output of kubectl describe svc kubernetes and look at the the Endpoint IP.

    Now lets check our cluster info

    kubectl cluster-info

    Please note that the kubernetes master is running at the same IP as the Endpoints IP of kubernetes.default service.

    Hope it helps.

提交回复
热议问题