Comment 2 for bug 1867168

Revision history for this message
Ian Booth (wallyworld) wrote :

Normally you'd access pods via a service, not directly; this allows the pods to come and go but the service is the stable endpoint for those pods. As Tom says, let's explore the use case.

The hostname field info network-get is only filled out if Juju can detect the hostname for the interface and if it is resolvable.

As a short term workaround, you already have all the pieces needed to construct the FQDN if needed. The namespace is the same as the model name which is exposed via a hook env var JUJU_MODEL.
You can configure the pod to set an env var equal to the valueRef spec.nodeName to get the pod name.