<p>I've build a npm react-app that connects to a REST-backend using a given url.
To run the app on kubernetes, I've distributed the app and put it into an nginx container.
The app starts nicely, but I want to make the backend url configurable without having to rebuild the container image every time.
I don't know how to do that or where to search for, any help would be appreciated</p>

Urr4
<p>You have several methods to achieve your objective</p>

<ul>
<li><a href="https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/" rel="nofollow noreferrer">Use environment variables</a></li>
</ul>

<pre><code>    apiVersion: v1
    kind: Pod
    metadata:
     name: pod-name
    spec:
      containers:
      - name: envar-demo-container
        image: my_image:my_version
        env:
         - name: BACKEND_URL
           value: "http://my_backend_url"
</code></pre>

<ul>
<li><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer">Using a configmap as a config file for your service</a></li>
<li>If the service is external, you can use a fixed name and register as a local kubernetes service: <a href="https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-mapping-external-services" rel="nofollow noreferrer">https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-mapping-external-services</a></li>
</ul>

<p>Regards.</p>
