I'm currently reading 'The Kubernetes Book' by Nigel Poulton, and while it seems promising, I'm struggling to get any of the examples to work. I've been following along with the setup for applications and services, but by chapter 8, I still can't see any of them running in my web browser. I've tried using Kind, K3d, and Minikube, but nothing seems to be functioning. Interestingly, I can get other tutorials to work just fine, so it seems to be an issue specifically with this book's examples. Has anyone else faced similar challenges? How did you manage to resolve them? Thank you!
5 Answers
This could be a great troubleshooting exercise! Use `kubectl describe` on your service to check the defined ports and IP. If everything looks good there, then port-forwarding might be your best bet to access it.
It seems like the author aimed to give readers a hands-on experience with Kubernetes. If you're having trouble, check if you're using the same Kubernetes version as mentioned in the book. Sometimes, API changes can affect examples like these!
Have you checked what version of Kubernetes the book refers to? It can really change things, especially with how resources are defined. If possible, share a basic example you're trying; that might help others diagnose the issue!
The API version is critical, but as long as you're using `apps/v1`, it should be fine. Every YAML has versioning, so you shouldn’t see issues there. Just check your deployment logs too!
What happens when you access your service through the URL http://node-ip:30001/? You might find a clue there!
I get an unreachable error at that address. Even trying minikube's IP leads to a 'This site can’t be reached' message.
Sounds like a networking issue. Make sure the service is actually running. Consider using the `kubectl port-forward` command to check it out directly.
Make sure that your Kubernetes version matches what's being discussed in the book. That's a common pitfall!
Good point! The book doesn't specify, which is frustrating. Do you think it would affect something as basic as the Hello World deployment? That YAML looks pretty standard to me.