【发布时间】:2019-05-24 02:26:21
【问题描述】:
我正在将我的 dockerized 应用程序移植到 kubernetes,但在使用 aks 创建负载均衡器时遇到了问题:
The Service "lbalance" is invalid: spec.ports[0].nodePort: Invalid value: 80: provided port is not in the valid range.
The range of valid ports is 30000-32767
配置非常简单
apiVersion: v1
kind: Service
metadata:
name: lbalance
spec:
selector:
app: lbalance
ports:
- protocol: TCP
port: 80
targetPort: 80
nodePort: 80
name: http
- protocol: TCP
port: 443
targetPort: 443
nodePort: 443
name: https
type: LoadBalancer
在它后面是一个 haproxy,通过 ssl 终止集群中暴露的其他服务
在我的测试环境中,我有一个属性来控制要打开哪个端口 (--service-node-port-range),但我在门户页面和 Azure 文档中都找不到该属性。
有没有办法在默认端口上提供服务或推荐的方式连接回该端点端口?
【问题讨论】:
标签: azure kubernetes azure-aks