Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Updated documentation link
Source Link
Dave Neeley
  • 3.7k
  • 3
  • 27
  • 42

The correct syntax is to use $(FOO), as is described in the v1.EnvVar value: documentationthe documentation; the syntax you have used is "shell" syntax, which isn't the way kubernetes interpolates variables. So:

containers: - env: - name: POD_ID valueFrom: # etc etc - name: LOG_PATH value: /var/log/mycompany/$(POD_ID)/logs 

Also please note that, as mentioned in the Docs, the variable to expand must be defined before the variable referencing it.

The correct syntax is to use $(FOO), as is described in the v1.EnvVar value: documentation; the syntax you have used is "shell" syntax, which isn't the way kubernetes interpolates variables. So:

containers: - env: - name: POD_ID valueFrom: # etc etc - name: LOG_PATH value: /var/log/mycompany/$(POD_ID)/logs 

Also please note that, as mentioned in the Docs, the variable to expand must be defined before the variable referencing it.

The correct syntax is to use $(FOO), as is described in the the documentation; the syntax you have used is "shell" syntax, which isn't the way kubernetes interpolates variables. So:

containers: - env: - name: POD_ID valueFrom: # etc etc - name: LOG_PATH value: /var/log/mycompany/$(POD_ID)/logs 

Also please note that, as mentioned in the Docs, the variable to expand must be defined before the variable referencing it.

fix envvar link
Source Link
FrVaBe
  • 49.6k
  • 19
  • 131
  • 166

The correct syntax is to use $(FOO), as is described in the v1.EnvVar value: documentationv1.EnvVar value: documentation; the syntax you have used is "shell" syntax, which isn't the way kubernetes interpolates variables. So:

containers: - env: - name: POD_ID valueFrom: # etc etc - name: LOG_PATH value: /var/log/mycompany/$(POD_ID)/logs 

Also please note that, as mentioned in the Docs, the variable to expand must be defined before the variable referencing it.

The correct syntax is to use $(FOO), as is described in the v1.EnvVar value: documentation; the syntax you have used is "shell" syntax, which isn't the way kubernetes interpolates variables. So:

containers: - env: - name: POD_ID valueFrom: # etc etc - name: LOG_PATH value: /var/log/mycompany/$(POD_ID)/logs 

Also please note that, as mentioned in the Docs, the variable to expand must be defined before the variable referencing it.

The correct syntax is to use $(FOO), as is described in the v1.EnvVar value: documentation; the syntax you have used is "shell" syntax, which isn't the way kubernetes interpolates variables. So:

containers: - env: - name: POD_ID valueFrom: # etc etc - name: LOG_PATH value: /var/log/mycompany/$(POD_ID)/logs 

Also please note that, as mentioned in the Docs, the variable to expand must be defined before the variable referencing it.

The variable to expand needs to be defined before the variable referencing it
Source Link

The correct syntax is to use $(FOO), as is described in the v1.EnvVar value: documentation; the syntax you have used is "shell" syntax, which isn't the way kubernetes interpolates variables. So:

containers: - env: - name: LOG_PATHPOD_ID valuevalueFrom: /var/log/mycompany/$(POD_ID)/logs# etc etc - name: POD_IDLOG_PATH valueFromvalue: # etc etc/var/log/mycompany/$(POD_ID)/logs 

Also please note that, as mentioned in the Docs, the variable to expand must be defined before the variable referencing it.

The correct syntax is to use $(FOO), as is described in the v1.EnvVar value: documentation; the syntax you have used is "shell" syntax, which isn't the way kubernetes interpolates variables. So:

containers: - env: - name: LOG_PATH value: /var/log/mycompany/$(POD_ID)/logs - name: POD_ID valueFrom: # etc etc 

The correct syntax is to use $(FOO), as is described in the v1.EnvVar value: documentation; the syntax you have used is "shell" syntax, which isn't the way kubernetes interpolates variables. So:

containers: - env: - name: POD_ID valueFrom: # etc etc - name: LOG_PATH value: /var/log/mycompany/$(POD_ID)/logs 

Also please note that, as mentioned in the Docs, the variable to expand must be defined before the variable referencing it.

Source Link
mdaniel
  • 33.5k
  • 6
  • 61
  • 66
Loading