Adding Probes to Streampipes' Kubernetes Deployment #1781
-
PurposeAdd probes to containers for health monitoring in Streampipes' Kubernetes deployment. Probes will enable Streampipes to automatically detect and handle container anomalies, improving application availability and stability. ProgramsAdd Readiness Probe:The Readiness Probe is used to check if a container is ready to receive traffic. It ensures that Streampipes containers are ready to receive traffic. If a container is not ready, Kubernetes removes it from load balancing to avoid sending requests to unavailable containers. readinessProbe:
httpGet:
path: /#/login
port: {{ .Values.streampipes.ui.port }}
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 30 Add Liveness Probe:The Liveness Probe is used to monitor whether a container is running properly to periodically check the health of the container. If the probe fails, Kubernetes will automatically restart the container to try to restore its health. livenessProbe:
httpGet:
path: /#/login
port: {{ .Values.streampipes.ui.port }}
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 30 Add Startup Probe:Startup Probe is used to check the health state of a container after it has started to ensure that the container does not receive traffic until it is fully ready. Avoid receiving traffic before the application is fully launched. startupProbe:
httpGet:
path: /#/login
port: {{ .Values.streampipes.ui.port }}
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 30 Add Restart Policy:Use the "OnFailure" restart policy to trigger a restart only when a Streampipes container fails or terminates abnormally. In this way, Kubernetes will be able to intelligently respond to the state of containers and restart them only when necessary, improving application stability. restartPolicy: OnFailure |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@luoluoyuyu thanks a lot for your detailed description! |
Beta Was this translation helpful? Give feedback.
hi @bossenti
I submitted a pr for this discussion(#1786).