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

A Node.js example using Stateful Set

The code within the application doesn't have any need for the Stateful Set mechanics, but let's use it as an easy-to-understand update to show how you might use a Stateful Set and how to watch it operate.

The code for this update is available on GitHub with the project at: https://github.com/kubernetes-for-developers/kfd-nodejs on the branch 0.4.0. The project's code wasn't changed, except that the deployment specification was changed to a Stateful Set. You can use the following commands to get the code for this version:

git clone https://github.com/kubernetes-for-developers/kfd-nodejs -b 0.4.0cd kfd-nodejs

The service definition changed, removing the Nodeport type and setting clusterIP to None. The new ...

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