I created a pod and try to connect from that pod to localhost. How is possible with the help of container arguments connect to localhost ?
You can always execute:
kubectl port-forward <pod-name> port:port
Check more here: https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/.
If you don't want to use port forwarding, then you need to expose your POD with a service. Read more here: https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/