I want to create an environment variable in the pod created by my sts which would consist of its FQDN. As the dns domain - ".cluster.local" can be different for various clusters, like '.cluster.abc', or '.cluster.def', I want to populate that dynamically based on the cluster settings. I checked that .fieldRed.fieldPath doesn't consist of anything like it.
Is there any other option to do that?
This is not a feature of Kubernetes. You would need to use a higher level templating system like Kustomize or Helm.