Usually the pods are hosted by different nodes on our cluster depending on the resources the pod would need and also that the running pod may not overload the node. Moreover a single node in a cluster can host multiple pods.
Specific to the question,when talking about all the development tools all the pods here should be hosted on a single node only because all of them have to communicate with each other . When the question arises for different environments it would be wise to host them on different nodes but same cluster.
Kubernetes provides us with the added advantage of selecting nodes on which we wish to run our pods. The NodeSelector concept can come handy in this case.
kubectl get nodes
kubectl get pods
Label any node that you have in your cluster :
kubectl label nodes gke-cluster1-default-pool-4db7fabf-zzx9 disktype=ccd
kubectl get nodes --show-labels
Now create a file to create a pod and mention the nodeSelector in that file.
nano task6pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: pod6
labels:
env: test
spec:
containers:
- name: container6
image: nginx
nodeSelector:
disktype: ccd
nodeSelector in this file is the same label as of the label of the node mentioned earlier.
kubectl create -f task6pod.yaml
kubectl get pods -o wide
After this command you can see that the newly created pod will have the node that you wanted the one with the label.