Reputation: 5196
I'm trying to find an answer to this question but can't find it clearly in the kubernetes documentation or in any Q/A forums.
I have a kubernetes cluster running with 4 nodes. Is it possible to create a second cluster that is reusing one or multiple nodes from the previous one ? Or is a node restricted to be in a single kubernetes cluster ?
I'm running the actual cluster with RKE (rancher tool for deploying k8 cluster) and I found this issue that makes me doubt about that possibility.
Thanks for any clarification.
Upvotes: 1
Views: 2370
Reputation: 560
Sharing the same K8s node for multiple clusters breaks the idea of K8s Node. For this issue probably Rancher has to warn or handle the exception for duplicate records or race condition while deploying the cattle-system pods.
Why don't you rather go via,creating a new Rancher Project or K8s Namespace where you will get to use the resources from the nodes that are already running K8s elements.
Upvotes: 2
Reputation: 44569
It's not possible actually. Kubelet running in each node registers the current node with a Kubernetes API Server. There is a heartbeat sent from the kubelet to the Kubernetes API Server. Now if you reconfigure that kubelet and instruct it to register to different Kubernetes API Server this will lead to heartbeat not going to the first Kubernetes API Server and that node will be marked as NotReady in the first Kubernetes API Server.
Upvotes: 5