当前位置:网站首页>Present pod information to the container through environment variables

Present pod information to the container through environment variables

2022-07-07 11:49:00 Jiangxl~

Through the environment variable Pod Information is presented to the container


Official configuration file

1. sketch

By means of pod In the definition of env The way , take pod The information of is defined as environment variables , Then output to the container .

pod Our information includes pod Of ip Address 、pod The name of 、pod Where namespace wait , These information can be defined as variables , Then use the form of variables in the program configuration file to define

2. take POD Of IP Defined as an environment variable

env
原网站

版权声明
本文为[Jiangxl~]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207070936112265.html