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