K8s之端口范围30000-32767 的问题-yellowcong

版权声明:本文为博主yellowcong原创文章,未经博主允许不得转载。 https://blog.csdn.net/yelllowcong/article/details/80680408

为了k8s和别的程序不起冲突,默认端口的范围是 30000-32767 ,我们可以手动的修改api-server的配置。

问题

The Service "svc-dot-2" is invalid: spec.ports[0].nodePort: Invalid value: 9002: provided port is not in the valid range. The range of valid ports is 30000-32767

这里写图片描述

修改apiserver

添加–service-node-port-range=1-65535” 这个配置,设定允许的端口

# Address range to use for services
KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16 --service-node-port-range=1-65535"

这里写图片描述

猜你喜欢

转载自blog.csdn.net/yelllowcong/article/details/80680408