Error description:
each time you upgrade the microservice (update the microservice version), there is a period of time when the visitor reports 503. istio-proxy
+ connect error or disconnect/reset before headers.
Reason:
Kubernetes detects Pod readiness (Running status) when a container in the Pod is ready. But once Istio is deployed, the first Pod ready is the istio-proxy
container. istio-proxy
receives the traffic and finds that upstream microservice has not been started, so istio-proxy
will return 503.
The solution:
once you know why, the idea is simple. Just tell Kubernetes that Pod is ready after all the containers in the Pod have been started. Adding readinessprobes to other containers in Pod allows Kubernetes to confirm that the container is ready before forwarding the traffic. As added in the Pod template
livenessProbe:
httpGet:
path: /healthz
port: 80
httpHeaders:
initialDelaySeconds: 10
periodSeconds: 3
The readinessProbe
reference: https://k8smeetup.github.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
Read More:
- error: \*1035 connect() failed (111: Connection refused) while connecting to upstream, client…..
- Nginx reports 502 error, log connect() failed (111: Connection refused) while connecting to upstream. A personal effective solution
- Encryption unsuccessful, need to factory reset or crash after android restarts several times
- A PHP Error was encountered Severity: Warning Message: mysqli::real_connect(): Headers and client
- MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect EC
- 【MongoDB】 Failed to connect to 127.0.0.1:27017, reason: Connection refused
- Reset local git account and generate secret key
- Nginx: recv() failed (104: connection reset by peer) troubleshooting
- ConnectionResetError: [Errno 104] Connection reset by peer
- Caused by: java.net.SocketException : connection reset or caused by: java.sql.SQLRecoverableException solve
- Eclipse reset annotation shortcuts
- Failed to connect to Mir:Failed to connect to server socket:No such file or directory
- Reset power on password of lightning simulator
- error:Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused;error:couldn‘t ….
- RTMP_Connect0, failed to connect socket. 110 (Connection timed out)
- Failed to load resource: net::ERR_CONNECTION_RESET
- java.sql.SQLRecoverableException: IO Error: Connection reset
- About connection reset by peer: socket write error
- [Solved] failed to connect to server, reason: Unable to establish connection
- Solve the problem caused by: java.sql.SQLRecoverableException : IO error: connection reset related problems