首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >服务-节点-端口范围不喜欢逗号分隔的端口列表

服务-节点-端口范围不喜欢逗号分隔的端口列表
EN

Stack Overflow用户
提问于 2021-05-21 15:49:35
回答 1查看 411关注 0票数 0

我可以使用像apiserver.service-node-port-range这样的端口范围配置10000-19000额外配置,但是当我指定一个逗号分隔的端口列表(如17080,13306 minkube )时,它将不会启动,引导循环如下所示

代码语言:javascript
复制
  initialization failed, will try again: wait: /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.20.2:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml  --ignore-preflig
ht-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailabl
e--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem,S
ystemVerification,FileContent--proc-sys-net-bridge-bridge-nf-call-iptables": Process exited with status 1
stdout:
[init] Using Kubernetes version: v1.20.2
[preflight] Running pre-flight checks
[preflight] The system verification failed. Printing the output from the verification:
KERNEL_VERSION: 5.10.26-1rodete1-amd64
DOCKER_VERSION: 20.10.5
OS: Linux
CGROUPS_CPU: enabled
CGROUPS_CPUSET: enabled
CGROUPS_DEVICES: enabled
CGROUPS_FREEZER: enabled
CGROUPS_MEMORY: enabled
CGROUPS_PIDS: enabled
CGROUPS_HUGETLB: enabled
[preflight] Pulling images required for setting up a Kubernetes cluster
.
.
.
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.

        Unfortunately, an error has occurred:
                timed out waiting for the condition

        This error is likely caused by:
                - The kubelet is not running
                - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

        If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
                - 'systemctl status kubelet'
                - 'journalctl -xeu kubelet'

        Additionally, a control plane component may have crashed or exited when started by the container runtime.
        To troubleshoot, list all containers using your preferred container runtimes CLI.

        Here is one example how you may list all Kubernetes containers running in docker:
                - 'docker ps -a | grep kube | grep -v pause'
                Once you have found the failing container, you can inspect its logs with:
                - 'docker logs CONTAINERID'


stderr:

我检查了库伯-阿皮瑟,只取了端口范围。逗号分隔的端口列表是否支持minikube?

--service-node-port-range <a string in the form 'N1-N2'> Default: 30000-32767

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-05-28 07:14:16

请将此作为社区wiki发布,并提供更多有关此主题的详细信息和发现。

我们唯一可以找到关于逗号分隔的端口和端口范围列表的信息的地方是https://minikube.sigs.k8s.io/docs/handbook/accessing/#increasing-the-nodeport-range

增加NodePort范围 默认情况下,只有公开端口30000-32767。如果这不适用于> you,则可以使用以下方法调整范围: minikube start --extra-config=apiserver.service-node-port-range=1-65535 此标志还接受一个逗号分隔的端口列表和端口范围。

另一方面,来自https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/

-服务-节点-端口范围<表单'N1-N2'>中的字符串-默认值: 30000-32767

我已经用k8s v1.20进行了测试,并且逗号分隔的端口列表也不适合我。Kube-apiserver接受两种方法:

set解析表单"value“、"min-max”或"min+offset“的字符串,包括两端的。

代码语言:javascript
复制
--service-node-port-range=30100-31000   # using "min-max" approach
--service-node-port-range=25000+100     # using "min+offset" approach (valid ranges will be 25000-25100)

追加资源:

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67640149

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档