<p>I am trying to run a container image in GCP Cloud run.</p>
<p>Tech Stack:
.NET 6, C#, Orleans.NET, ASP.NET</p>
<p>My code requires the podIP to work properly.</p>
<p>This programs works properly in a regular Kubernetes cluster, because I am able to set an environment variable with the assigned podIP with the following configuration in the &quot;env&quot; section of the deployment.yaml file:</p>
<pre><code>  - name: POD_IP
    valueFrom:
      fieldRef:
        fieldPath: status.podIP
</code></pre>
<p>When I try to provide the same in Cloud Run yaml, I get:
<a href="https://i.stack.imgur.com/dBbp2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dBbp2.png" alt="GCP Cloud Run - YAML Edit" /></a></p>
<p>When I tried digging into the documentation of k8s.io.api.core.v1,</p>
<p><a href="https://cloud.google.com/run/docs/reference/rpc/k8s.io.api.core.v1#k8s.io.api.core.v1.EnvVarSource" rel="nofollow noreferrer">GCP Documentation - Kubernetes</a>
<a href="https://i.stack.imgur.com/kpki2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kpki2.jpg" alt="GCP Cloud Run - Documentation" /></a></p>
<p>This is saying that &quot;Not supported by Cloud Run&quot;.</p>
<p>Is there any way to set podIP in the environment variable of GCP - Cloud Run?</p>

B Shyam Sundar
<p>Cloud Run is a serverless product. As serverless product, you don't manage the servers and the network. Therefore, asking for the podIP make no sense and has no value (at least, it will be a private IP in the Google Cloud serverless network).</p>
<p>So, the answer is &quot;NO, you can't get the podIP&quot;.</p>
<p>But why do you need it? You can set a dummy value and see what happens we your container. Or to update your code to make optional that value.</p>
