Kubernetes 的 service yaml 配置文件中 port 指定的端口是暴露在集群内部的,请问如何向集群外面暴露端口通过 node 主机的 IP:port 就能访问?
service spec
type:NodePort
ports:
  - nodePort:30001
            将 type 设置为 NodePort ,通过 nodePort 指定对外暴露的端口
apiVersion: v1
kind: Service
metadata:
  name: blog-web
  namespace: production
spec:
  type: NodePort
  selector:
    app: blog-web
  ports:
  - nodePort: 30080
    port: 80
    targetPort: 80