SeniorSenior (6–10 yrs)KubernetesNode.jsGoogleUberShopify
Node clustering in Kubernetes
Should you use Node’s cluster module inside a Kubernetes Deployment? Why or why not?
Answers use simple, clear English.
Quick interview answer
Usually no. Let K8s scale replicas via HPA; one process per container is simpler for probes, memory limits, and crash isolation. Cluster inside a pod doubles complexity and can fight HPA.
Detailed answer
Usually no. Let K8s scale replicas via HPA; one process per container is simpler for probes, memory limits, and crash isolation. Cluster inside a pod doubles complexity and can fight HPA. Use cluster only on bare VMs without orchestrator, or carefully with fixed CPU and disabled HPA.
Real example & use case
API Deployment: 4 pods × 1 Node process; HPA on CPU 70%.
Pros & cons
Pros of pods-only: clearer ops. Cons: need enough replicas for cores.
#nodejs#kubernetes#scaling