Kubernetes Pod Container Default hostname
Conclusion
Container’s default hostname is set to pod’s name.
If you use ‘hostNetwork’ option, Container’s hostname is set to the physical host’s name where container is running.
Test
- Create a basic ubuntu pod
- Exec the pod container’s sh and check hostname
Leave a comment