<p>Following the Quarkus Rest Client tutorial I need to add something similar to this to the application.properties file:</p>

<p><code>country-api/mp-rest/url=https://restcountries.eu/rest</code></p>

<p>With Docker it works and I can pass the property value by parameter:</p>

<p><code>docker run -it --privileged --rm --env country-api/mp-rest/url="https://restcountries.eu/rest" mydockerhost/my-project:SNAPSHOT</code></p>

<p>The YAML file for Kubernetes looks like this:</p>

<pre><code>apiVersion: "apps/v1"
kind: "Deployment"
metadata:
  labels:
    app.kubernetes.io/name: "my-project"
    app.kubernetes.io/version: "SNAPSHOT"
  name: "my-project-deployment"
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: "my-project"
      app.kubernetes.io/version: "SNAPSHOT"
  template:
    metadata:
      labels:
        app.kubernetes.io/name: "my-project"
        app.kubernetes.io/version: "SNAPSHOT"
    spec:
      containers:
      - env:
        - name: "country-api/mp-rest/url"
          value: "https://restcountries.eu/rest"
</code></pre>

<p>However the following error is occurring when executing the command <code>kubectl apply -f my-projetc.yaml</code></p>

<p><code>The Deployment "my-project-deployment" is invalid:
* spec.template.spec.containers[0].env[1].name: Invalid value: "country-api/mp-rest/url": a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit (e.g. 'my.env-name',  or 'MY_ENV.NAME',  or 'MyEnvName1', regex used for 
validation is '[-._a-zA-Z][-._a-zA-Z0-9]*')
</code></p>

<p>Quarkus version: 1.3.1.Final</p>

<p>You can use environment variables in <code>application.properties</code> so you could do something like:</p>

<pre><code>country-api/mp-rest/url=${MY_SERVICE_URL}
</code></pre>

<p>and define <code>MY_SERVICE_URL</code> in your Yaml file.</p>

<p>Also, MicroProfile Config has a way to work around your issue. Using <code>COUNTRY_API_MP_REST_URL</code> as an environment variable should work (uppercase everything, replace anything non alphanumeric with <code>_</code>).</p>
