k8s 部署 nacos官方用的是type: ClusterIP可以再创建一个NodePort svc暴露
apiVersion: v1 kind: Service metadata: name: nacos-headless11 namespace: test labels: app: nacos annotations: service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" spec: type: NodePort ports: - port: 8848 name: server targetPort: 8848 nodePort: 30003 - port: 9848 name: client-rpc targetPort: 9848 nodePort: 31003 - port: 9849 name: raft-rpc targetPort: 9849 - port: 7848 name: old-raft-rpc targetPort: 7848 selector: app: nacos
请登录之后再进行评论