我是kubernetes上的乞讨者,我可以在最新的calico.yaml文件(Install Calico on nodes)上看到监听默认9099端口的配置。
我在几个节点上部署,当其他服务在后台运行时,该端口(9099)被用作端口。
从日志中我可以看到:
2020-08-28 12:15:15.107 [ERROR][59] felix/health.go 246: Health endpoint failed, trying to restart it... error=listen tcp 127.0.0.1:9099: bind: address already in use
2020-08-28 12:15:16.108 [ERROR][59] felix/health.go 246: Health endpoint failed, trying to restart it... error=listen tcp 127.0.0.1:9099: bind: address already in use
2020-08-28 12:15:17.108 [ERROR][59] felix/health.go 246: Health endpoint failed, trying to restart it... error=listen tcp 127.0.0.1:9099: bind: address already in use
2020-08-28 12:15:18.109 [ERROR][59] felix/health.go 246: Health endpoint failed, trying to restart it... error=listen tcp 127.0.0.1:9099: bind: address already in use日志来自pod:
kube-system calico-node-d4ntt 1/1 Running 0 9m41s
kube-system calico-node-mjh4z 0/1 Running 3 3m31s
kube-system calico-node-p5lgf 0/1 Running 2 3m34s
kube-system calico-node-t4vmd 0/1 Running 2 3m30s如何更新此端口?在yml文件上,我看不到端口。
我可以在yml文件中看到配置:
listenPort:
description: ListenPort is the port where BGP protocol should listen.
Defaults to 179
maximum: 65535
minimum: 1但这不是阻止我部署的端口。
发布于 2020-10-03 15:01:41
简而言之,您必须向calico.yaml calico-node容器部分添加containerPort参数
首先下载calico.yaml文件:
curl https://docs.projectcalico.org/manifests/calico.yaml -O在这个yaml文件中有一个DaemonSet,它有一个名为calico-node的容器,将DaemonSet.spec.template.spec.containers.ports.containerPort parameter添加到yaml文件中,并将其值更改为您想要的值(任何您想要的端口)。如下所示:
containers:
# Runs calico-node container on each Kubernetes node. This
# container programs network policy and routes on each
# host.
- name: calico-node
image: calico/node:v3.16.1
ports:
- containerPort: 9090发布于 2020-08-31 18:16:21
确保您的主机和防火墙根据您的配置- calico-kubernetes-requirements允许必要的流量。
设置TYPHA_HEALTHHOST或选中本地主机要解析的内容。类似的解决方案:felix-calico。
您还可以尝试更改livenessProve和readinessProbe:
livenessProbe:
httpGet:
path: /liveness
port: 9099 #here you can change port如果上述解决方案不起作用,请终止端口9099上的进程,然后重新安装Calico。
更多信息请访问:projectcalico-issue。
还可以看看:calico-incubator,calico-felix。
https://stackoverflow.com/questions/63635160
复制相似问题