question

VenkataSivaKumarSukka-1445 avatar image
0 Votes"
VenkataSivaKumarSukka-1445 asked VenkatYalla-0009 commented

Deployong to edge using Kubernates with environmental variables for every module in deployment yaml file

For having the ENV variables for the modules , here we are deploying through the Kubernates , we need to have the variables under the container name or the create options

createOptions: |
{
"Env": [
"POSTGRES_DB=$POSTGRES_DB"
]

}


or

  • name: postgres
    image: "postgres:$POSTGRES_VERSION"
    env:
    - name : POSTGRES_DB
    value: $POSTGRES_DB


Both i tried but i didnt see the enviromental variables on the module

azure-iot-edge
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@VenkataSivaKumarSukka-1445 I came across this example to Deploy Azure IoT Edge on Kubernetes (preview) Please refer and update if it helps.

115063-image.png


0 Votes 0 ·
image.png (13.6 KiB)

Thanks for the reply @AshokPeddakotla-MSFT, but I already mentioned in the post that I am using in the same way but still it didn't help in creating the ENV in the edge device. is there any other way ..?

0 Votes 0 ·

@VenkataSivaKumarSukka-1445 Just checking in to see if the below answer(s) helped.
If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.

0 Votes 0 ·

Is this the right format for giving the Environmental variables in kubernates deployment file..?

createOptions: |
{
"Env": [
"POSTGRES_DB="Password@""
]

}

0 Votes 0 ·
VenkatYalla-0009 avatar image VenkatYalla-0009 VenkataSivaKumarSukka-1445 ·

Can you clarify what "Kubernetes deployment file" is? How are you applying deployment in this file?

0 Votes 0 ·

1 Answer

VenkatYalla-0009 avatar image
0 Votes"
VenkatYalla-0009 answered VenkatYalla-0009 edited

You cannot use variable substitution (`$POSTGRES_DB`) in the IoT Edge deployment manifest, currently.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.