如何解决从Kubernetes窗格副本卷曲到其他副本窗格无法连接拒绝连接
我的活动和就绪检查失败,并且在广告连播说明中看到了以下错误:
Readiness probe Failed: dial tcp 10.123.1.23:5000: connect: connection refused
当我从吊舱的副本卷曲到https://10.123.1.23:5000时,我收到类似的错误(Failed to connect to ...the IP.. port 5000: Connection refused
)。我读到一些暗示,如果地址/端口有效,是否应该可以从另一个吊舱卷曲。我不明白为什么会这样,因为我不完全了解群集网络内部。
因此,我假设该地址对于就绪探针实际上无效。为什么我无法连接curl?该IP地址与我的广告连播的IP地址匹配,我在广告连播说明中的“容器”下看到了这个地址:
Containers:
....
Port: 5000/TCP
这是我的Yaml,显示运行状况探针设置:
apiVersion: apps/v1
kind: Deployment
Metadata:
name: myApp
spec:
...
template:
Metadata:
labels:
app: myApp
spec:
...
containers:
- name: myApp
...
ports:
- containerPort: 5000
...
readinessProbe:
tcpsocket:
port: 5000
initialDelaySeconds: 300
periodSeconds: 5
successthreshold: 1
failureThreshold: 3
livenessProbe:
tcpsocket:
port: 5000
periodSeconds: 30
initialDelaySeconds: 300
successthreshold: 1
failureThreshold: 3
...
我也尝试和http探针调用索引页面,但收到类似的错误Readiness probe Failed: Get http://...myIP...:5000/index.html: dial tcp ...myIP...:5000: connect: connection refused
readinessProbe:
httpGet:
path: /index.html
port: 5000
initialDelaySeconds: 500
periodSeconds: 5
successthreshold: 1
failureThreshold: 3
livenessProbe:
httpGet:
path: /index.html
port: 5000
periodSeconds: 30
initialDelaySeconds: 500
successthreshold: 1
failureThreshold: 3
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。