-
Notifications
You must be signed in to change notification settings - Fork 219
Open
Description
Your tutorial is really helpful. I have two things to point at on https://github.com/Praqma/LearnKubernetes/blob/master/kamran/Kubernetes-The-Hard-Way-on-BareMetal.md
- As I was going through this I hit an issue with your test image kamranazeem/centos-multitool. I don't know if the problem is from my setup?
$ kubectl run centos-multitool --image=kamranazeem/centos-multitool
deployment "centos-multitool" created
$ kubectl get pods -o wide -w
NAME READY STATUS RESTARTS AGE IP NODE
centos-multitool-1226373562-rb2md 0/1 ImagePullBackOff 0 53s 10.200.0.14 worker-1
nginx-158599303-7jkwz 1/1 Running 3 1d 10.200.1.13 worker-2
nginx-158599303-p89b2 1/1 Running 3 1d 10.200.0.13 worker-1
centos-multitool-1226373562-rb2md 0/1 ErrImagePull 0 1m 10.200.0.14 worker-1
centos-multitool-1226373562-rb2md 0/1 ImagePullBackOff 0 1m 10.200.0.14 worker-1
centos-multitool-1226373562-rb2md 0/1 ErrImagePull 0 1m 10.200.0.14 worker-1
centos-multitool-1226373562-rb2md 0/1 ImagePullBackOff 0 1m 10.200.0.14 worker-1
- I suggesting instead of extracting the PodCIDR information with https://github.com/Praqma/LearnKubernetes/blob/master/kamran/Kubernetes-The-Hard-Way-on-BareMetal.md#managing-the-container-network-routes steps.
You can simple get all at once without container with command:
$ kubectl get nodes --output=jsonpath='{range .items[*]} {.spec.podCIDR} {.spec.externalID} {"\n"}{end}'
10.200.0.0/24 worker-1
10.200.1.0/24 worker-2
or for each node can be done with below:
$ kubectl get nodes --output=jsonpath='{range .items[*]}{.spec.podCIDR} {.spec.externalID} {"\n"}{end}' | grep worker-1 | awk '{print $1}'
10.200.0.0/24
NB: 'worker-1' and 'worker-2' is my worker node hostname(s).
Thanks once again for your time.
Metadata
Metadata
Assignees
Labels
No labels