kubernetes - environment variables not works with integers kubernetes - environment variables not works with integers kubernetes kubernetes

kubernetes - environment variables not works with integers


The problem was in the yamls identification code. You may have many problems with the error space in the yaml file.

https://github.com/helm/helm/blob/master/docs/chart_template_guide/yaml_techniques.md

About the number. Both answers are right. You can use single quotation marks '86400' and ACII "\ x38 \ x36 \ x34 \ x30 \ x30".

Thank you everybody


You have to use ASCII codes for numbers. So your deployment spec will look like

env:  - name: connectionSettings.connectionString.mongoDB    value: "mongodb://192.168.20.99:27017"  - name: configuration.token.issuer    value: "\x38\x36\x34\x30\x30"

And check env variables:

sukhoversha@sukhoversha:~/GCP$ kubectl  exec myapp-dev-api-dep-7948866b56-6cnmk  env | grep conconnectionSettings.connectionString.mongoDB=mongodb://192.168.20.99:27017configuration.token.issuer=86400