<p>I have a new Nuxt 3 application. In my config.ts, I have the following variables defined:</p>
<pre class="lang-js prettyprint-override"><code>    runtimeConfig: {
        // Private keys are only available on the server
        // Public keys that are exposed to the client
        public: {
            baseUrl: process.env.NUXT_PUBLIC_BASE_URL || '&lt;url&gt;',
            communityId: process.env.NUXT_ENV_COMMUNITY_ID || &lt;id&gt;,
        }
    },
</code></pre>
<p>I have this application built to a docker image, then deployed to Kubernetes as a pod/deployment, alongside a configmap which holds the 2 variables I defined earlier.</p>
<p>When I SSH into the pod, and run <code>echo $NUXT_ENV_COMMUNITY_ID</code>, I can see the ID I set in the configmap, and same story with the base url, however when I try to access the variables in Nuxt, they default to their default options. If I remove the defaults, the app crashes/returns a 500 error since they are not defined.</p>
<p>Any suggestions?</p>
<p>--EDIT YAML--</p>
<p>Deployment</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: &lt;app name&gt;-deployment
  namespace: default
  labels:
    app: &lt;app name&gt;
spec:
  replicas: 2
  selector:
    matchLabels:
      app: &lt;app name&gt;
  template:
    metadata:
      labels:
        app: &lt;app name&gt;
    spec:
      imagePullSecrets:
        - name: regcred
      containers:
        - name: &lt;container name&gt;
          image: &lt;my-image&gt;
          ports:
            - containerPort: 3000
          envFrom:
            - configMapRef:
                name: &lt;app name&gt;-config

</code></pre>
<p>Configmap</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: &lt;app name&gt;-config
  namespace: default
data:
  NUXT_PUBLIC_BASE_URL: &quot;&lt;url&gt;&quot;
  NUXT_ENV_COMMUNITY_ID: &quot;2&quot;

</code></pre>

Flinty926
<p>See <a href="https://nuxt.com/docs/guide/going-further/runtime-config#environment-variables" rel="nofollow noreferrer">https://nuxt.com/docs/guide/going-further/runtime-config#environment-variables</a>.</p>
<p>You can set your variables as empty strings in <code>runtimeConfig.public</code>.
I also notice there's no <code>_PUBLIC_</code> on the second one, might be the issue.</p>
