How do I externally access a service with kubernetes NodePort?

前端 未结 3 749
醉话见心
醉话见心 2021-01-14 10:06

I\'ve setup a NodePort service using the following config:

wordpress-service.yaml

apiVersion: v1
kind: Service
metadata:
  labels:
          


        
3条回答
  •  太阳男子
    2021-01-14 10:18

    Service defined like this got assgned a high port number and is exposed on all your cluster nodes on that port (probably something like 3xxxx). Hard to tell the rest without proper knowledge of how your cluster is provisioned. kubectl get nodes should give you some knowledge about your nodes.

    Although I assume you want to expose the service to the outside world. In the long run I suggest getting familiar with LoadBalancer type services and Ingress / IngressController

提交回复
热议问题