O'Reilly logo

Kubernetes for Developers by Joseph Heck

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required