3

Next version 12.1.5 Kubernetes version 1.20

Until now I've copied a .env file to the next image and regulated them that way, but now a new requirement came to hold the env variables in Kubernetes secrets. After adding the needed change, that is creating the secret and adding "secretAddRef" keys to the env section of my deployment file, when logging process.env within the next.config.js file I get undefined.

The strange thing is that they are present when using shh to enter the Kubernetes pod and running "printenv".

juliomalves
  • 42,130
  • 20
  • 150
  • 146
Amar
  • 39
  • 3
  • This question needs a [mcve]. Please show us your Kubernetes deployment resources, and sufficient code to reproduce the problem you've described. – larsks May 08 '23 at 18:00

0 Answers0