<p>we have python application deployed in aks cluster but it is not printing the env variables passed to the container . we are using aks cluster version 1.24 , if I use busy box image instead on this image , I am able to see env varibles .</p>
<pre><code>kubectl exec -it xyz-data-service-7699446d89-jfgk6  /bin/sh -n mds

apiVersion: apps/v1
kind: Deployment
metadata:
  name: xyz-data-service
spec:
 replicas: 1
 selector:
   matchLabels:
    app: xyz-data-service
 template:
   metadata:
    labels:
     app: xyz-data--service
   spec:
    containers:
      - name: xyz-metadata-service
        image: myacr.io:python:3.10.2
        command:
        - &quot;/bin/sleep&quot;
        - &quot;10000&quot;        
        imagePullPolicy: Always
        ports:
        - containerPort: 5000
        volumeMounts:
        env:
        - name: client-secret
          value: test-val
        - name: client-secret2
          value: test-val2
                 
    imagePullSecrets:
      - name: acrcred
</code></pre>
<p>Dockerfile</p>
<pre><code>FROM python:3.10.2

RUN mkdir /config-service
WORKDIR /config-service
COPY requirements.txt /config-service
RUN pip install -r requirements.txt
COPY . /config-service/

CMD python main.py
</code></pre>

Rajendar Talatam
<p>it's because of '-' (dash) in environment variable's name.</p>
<pre><code>    env:
    - name: client_secret
      value: test-val
    - name: client_secret2
      value: test-val2
</code></pre>
<p>will work.</p>
<p>please refer to <a href="https://stackoverflow.com/questions/21525424/how-to-declare-variable-name-with-char-dash-in-linux-bash-script">here</a></p>
