[amgad]

ReplicaSet self-healing lab

Kubernetes lab: a Node.js app with a deliberate failure endpoint, run as a three-pod ReplicaSet behind a NodePort Service, to watch the cluster restart failed containers.

PERIOD
"Oct 2026"
STACK
"Kubernetes, Docker, Node.js, Minikube"
UPDATED
"Oct 2026"
github.com/amga-d/node-app-failure-point

Overview

A short lab for watching self-healing happen. The app has a /failure endpoint that stops its own container. Run it as a ReplicaSet of three pods, call that endpoint, and watch a pod drop into Error and come back.

It also covers the plumbing around it: building the image, pushing it to a local registry, and configuring containerd on the node to pull from that registry.

What I built

  • Node.js app with a deliberate failure point, and its Dockerfile.
  • ReplicaSet and NodePort Service manifests.
  • Step-by-step guide for Minikube on the kvm2 driver with a local image registry.

How it fits together

    • curlfrom the host
  1. nodePort 30008
    • ServiceNodePort, port 80
  2. targetPort 3000
    • ReplicaSet3 pods

GET /failure stops one container. The pod shows Error, then restarts.

In the repository

$ git clone https://github.com/amga-d/node-app-failure-point.git

tree -L 1

.
├── .gitignore
├── Dockerfile
├── package-lock.json
├── package.json
├── README.md
├── ReplicaSet.yaml
├── server.js
└── Service.yaml

git log --author=amga-d --oneline -1

  1. caff827inital commit: node-app-failure-point-v1
  • JavaScript 73.2%
  • Docker 26.8%