Adding a probe to our Node.js example

Adding example probes to the Node.js/express-based application follows exactly the same pattern as the Python application. And like the Python example, the code and specifications for this are available at GitHub under the https://github.com/kubernetes-for-developers/kfd-nodejs project, associated with branch 0.3.0

The probes add nearly the same specification to the Node.js deployment:

livenessProbe:  httpGet:    path: /probes/alive    port: 3000  initialDelaySeconds: 1  periodSeconds: 5readinessProbe:   httpGet:    path: /probes/ready    port: 3000  initialDelaySeconds: 5  periodSeconds: 5

In this case, the probes are requesting against the same HTTP responses that the application provides, and the same port. The URI ...

Get Kubernetes for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.