GitHub Repo Sharing: kubernetes-scripts
Learn about using Kubernetes scripts for various developer tasks, such as debugging, using the GitHub repository kubernetes-scripts.
Join the DZone community and get the full member experience.Join For Free
I have been learning k8s for several months. Some scripts, I have been using quite often.
Here comes the GitHub repo: kubernetes-scripts.
(Hint: Want to learn Kubernetes with real scenarios? Check the challenges-kubernetes repo.)
Some scripts are quoted from GitHub.
For debugging purpose, you might want to know which node runs a given pod.
You might run into similar errors like below, right? The request fails with some tcp endpoint.
,----------- | root@k8s1:~# curl http://localhost:8001/api/... | Error: 'dial tcp 172.17.0.2:8443: getsockopt: no route to host' | Trying to reach: 'https://172.17.0.2:8443/' `-----------
It says no route to host. Should be some network issue. But who holds the IP of 172.17.0.2?
Want to identify the pod with one command? Try the script on GitHub.
Want to check more? Everything is on GitHub.
If you find the repo useful or interesting, please remember to star or fork it. Cheers!
Original URL: https://dennyzhang.com/kubernetes-scripts
Published at DZone with permission of Denny Zhang, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.