Kubernetes Deep Dive

Sign Up Free or Log In to participate!

Pod allocation

Hi!

I issued the deployment on a 3 nodes cluster but 2 pods where allocated on the same node unlike your example…¿Should I expect that each node is hosted in a different node?

This is the setup I created:

$ kubectl get nodes

NAME STATUS ROLES AGE VERSION

gke-mi-gke-1-default-pool-141c8652-8ndq Ready 11m v1.18.15-gke.1501

gke-mi-gke-1-default-pool-141c8652-c7v6 Ready 11m v1.18.15-gke.1501

gke-mi-gke-1-default-pool-141c8652-l9fv Ready 11m v1.18.15-gke.1501

get pods -o wide

NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES

pingtest-99bcc488c-6rbbh 1/1 Running 0 66s 10.0.1.2 gke-mi-gke-1-default-pool-141c8652-8ndq

pingtest-99bcc488c-7tnqg 1/1 Running 0 66s 10.0.2.4 gke-mi-gke-1-default-pool-141c8652-l9fv

pingtest-99bcc488c-92ns8 1/1 Running 0 66s 10.0.1.3 gke-mi-gke-1-default-pool-141c8652-8ndq

Thank you!

1 Answers

It is common behavior for kubernetes, if you would like to run them in a specific node you could follow this wiki page https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?