我要求测试服务器应使用端口范围 20000 - 22767
我kubeadm-config
用命令编辑了
kubectl edit cm kubeadm-config -n kube-system
当我查看结果时,我发现更改似乎已被存储:
命令$ kubeadm config view
给了我
apiServer:
extraArgs:
authorization-mode: Node,RBAC
service-node-port-range: 20000-22767
timeoutForControlPlane: 4m0s
apiVersion: kubeadm.k8s.io/v1beta1
certificatesDir: /etc/kubernetes/pki
clusterName: kubernetes
controlPlaneEndpoint: ""
controllerManager: {}
dns:
type: CoreDNS
etcd:
local:
dataDir: /var/lib/etcd
imageRepository: k8s.gcr.io
kind: ClusterConfiguration
kubernetesVersion: v1.13.3
networking:
dnsDomain: cluster.local
podSubnet: 10.244.0.0/16
serviceSubnet: 10.96.0.0/12
scheduler: {}
但是当我后来尝试在 hte 新端口范围内安装一些东西时,我得到了错误
helm upgrade --install --kubeconfig /external-storage/workspace/potapi-orchestration/clusters/at/admin.conf potapi-services charts/potapi-services -f charts/potapi-services/values.at.yaml
Error: UPGRADE FAILED: Service "potapi-services" is invalid: spec.ports[0].nodePort: Invalid value: 21011: provided port is not in the valid range. The range of valid ports is 30000-32767
我在这里摆弄了建议,但没有运气:https ://github.com/kubernetes/kubeadm/issues/122