I have the following situation. I am using an ASP.Net Core API and I need to get the name of the machine executing calls.
I am using the following code:
var machine = System.Environment.MachineName;
If I run the API solution locally in my machine I get the name of this:
"L10PCXXXXXXX"
But if I run the API as a pod over Kubernetes I get the name of the pod:
"api-test-75575d9d8b-ckjkp"
My question is, how I can get the full name considering the execution over Kubernetes?
Thanks!