我正在尝试跟踪这个文档,以便在集群中对我的豆荚进行准备状态和活性探测,但是当连接拒绝到容器IP和端口时,它会给我一个错误。我增加了准备和活力的部分在下面。
我正在使用舵机进行部署,我试图监视的端口是80。下面也给出了入口的服务文件。
https://learn.microsoft.com/en-us/azure/application-gateway/ingress-controller-add-health-probes
Service.yaml
apiVersion: v1
kind: Service
metadata:
name: expose-portal
annotations:
service.beta.kubernetes.io/azure-load-balancer-internal: "{{ .Values.isInternal }}"
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: portalDeployment.yaml
spec:
containers:
- name: App-server-portal
image: myacr-app-image-:{{ .Values.image_tag }}
imagePullPolicy: Always
ports:
- name: http
containerPort: 80
protocol: TCP
readinessProbe:
httpGet:
path: /
port: 80
periodSeconds: 3
timeoutSeconds: 1
livenessProbe:
httpGet:
path: /
port: 80
periodSeconds: 3
timeoutSeconds: 1
volumeMounts:
- mountPath: /etc/nginx
readOnly: true
name: mynewsite
imagePullSecrets:
- name: my-secret
volumes:
- name: mynewsite.conf
configMap:
name: mynewsite.conf
items:
- key: mynewsite.conf
path: mynewsite.conf我是不是做错什么了。根据今天的蔚蓝文档,目前不支持在舱上公开的端口以外的端口进行探测。我的理解是我舱上的80端口已经暴露了。
发布于 2020-01-22 06:44:56
从医生那里拿来的:
在启动活动或准备状态探测之前容器启动后的
解决办法是增加超时时间。
PS。我认为您可能需要引入initialDelaySeconds,而不是将超时时间增加到3分钟。
https://stackoverflow.com/questions/59794286
复制相似问题