Hostname not resolved inside a pod



So I wanted to ask you, what should I really do? and if it is necessary to give a hostname to the pod?


It is not necessary to give a Pod a DNS entry. The Service object is used to provide a stable point of access for deployments/pods as pods are by nature temporary. Here’s a good run down of how to expose applications, link