我们有一个http livenessProbe设置
livenessProbe:
httpGet:
path: /admin
port: http
initialDelaySeconds: 180
periodSeconds: 20但是为什么描述中的连接是通过https
Liveness probe failed: Get https://10.11.1.7:80/admin: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)发布于 2020-03-27 17:22:48
Kubernetes正在执行您所要求的操作,探测http url,但是您的应用程序pod web服务器正在将其重定向到https,这导致了错误。
您可以在pod中修复它,也可以使用TCP probe
apiVersion: v1
kind: Pod
metadata:
name: goproxy
labels:
app: goproxy
spec:
containers:
- name: goproxy
image: k8s.gcr.io/goproxy:0.1
ports:
- containerPort: 8080
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 15
periodSeconds: 20https://stackoverflow.com/questions/60882866
复制相似问题