book-of-kubernetes / examples

Examples for The Book of Kubernetes
MIT License
146 stars 71 forks source link

chapter-09 not working #14

Open jcaberio opened 1 year ago

jcaberio commented 1 year ago

I followed the steps here for aws setup. I was able to follow along from chapter 1 to chapter 8 but in chapter 9 I was unable to deploy the pods

ansible-playbook aws-setup.yaml

ansible-playbook playbook.yaml

./aws-ssh.sh host01

sudo su -
nodes pods
AlanHohn commented 1 year ago

You're right to suspect an issue with the nodes. It's showing that the kubelet process on the nodes isn't reporting in to the API server. Did both Ansible playbooks complete successfully?

To diagnose this kind of thing, you can look at the logs for the kubelet service running on any of the nodes. You can do this using journalctl -xu kubelet as root on that node. You may find that the AWS Network Load Balancer didn't get set up correctly for some reason, and therefore traffic isn't being routed from the HA IP to an API server instance. Or, there may have been an issue with registering the nodes with the API server using the bootstrap token.