question

YongchaoLiuNeusoftAmericaInc-6769 avatar image
0 Votes"
YongchaoLiuNeusoftAmericaInc-6769 asked srbhatta-msft commented

Azure Kubernetes environment variable Synchronization issues

I have a service that needs to call others service
this service invocation like this:
os.getenv('{}_SERVICE_HOST',serviceName)
https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#environment-variables

The call was fine, but I encountered that when I add a new internal service, the environment variable was not present on the calling side
B service as calling side and have env:
env:B_SERVICE_HOST
A_SERVICE_HOST

When I deploy a new C:
env:B_SERVICE_HOST
A_SERVICE_HOST
C_SERVICE_HOST
How do I sync env over without redeploying B?

Thanks.



azure-kubernetes-service
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.

1 Answer

srbhatta-msft avatar image
0 Votes"
srbhatta-msft answered srbhatta-msft commented

Hello @YongchaoLiuNeusoftAmericaInc-6769 , Thanks for reaching out. Apologies for the delay in response. Could you please elaborate the issue a little more for us to understand it better?

· 2
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.

Sorry,

I solved this problem by DNS request,

Using an environment variable like SERVICE_HOST is not a good idea for me.

Thanks

0 Votes 0 ·
srbhatta-msft avatar image srbhatta-msft YongchaoLiuNeusoftAmericaInc-6769 ·

@YongchaoLiuNeusoftAmericaInc-6769 , glad to hear that. Thanks for sharing the resolution with us here for the benefit of the community.

0 Votes 0 ·