From the course: Cloud Native Development with Node.js, Docker, and Kubernetes
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Add a liveness check
From the course: Cloud Native Development with Node.js, Docker, and Kubernetes
Add a liveness check
- [Instructor] As well as providing template docker files and helm charts to simplify packaging and deploying Node.js apps to Kubernetes. The Cloud Native JS also provides Node modules for adding health checks to an application. This is all done in the health checking project. If we view that on GitHub, it shows us there is a cloud health connect module. And this provides a connect middleware for adding health checks, so liveness and readiness end points to an existing application. To do that, we first follow the instructions on how to install. Inside our terminal, let's make sure we're inside our project directory, and then use that npm install command. And this does npm install, and then the name of the module as it's hosted on npm, which is @cloudnative/health-connect. This both downloads and installs the module, and adds it to our package.json file. Let's see that inside the S code. We can see the S code, in the package.json file, that our dependencies been added, and it's been…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.