sig-windows-tools icon indicating copy to clipboard operation
sig-windows-tools copied to clipboard

How to use host's environment variables in the hostprocess container

Open IndCheung opened this issue 1 year ago • 3 comments
trafficstars

I created a Flannel container using the hostprocess mode, but I found that after Flannel starts, it will call Powershell to execute some commands. However, the hostprocess container seems to not be able to share environment variables with the host, so executing the Powershell command in Flanneldexe reported an error. How do you solve this problem?

Note: I used the following base image to build the image: https://github.com/microsoft/windows-host-process-containers-base-image

IndCheung avatar Apr 22 '24 07:04 IndCheung

you can use the Pod specs Environment variables to map in environment variables needed

jsturtevant avatar Apr 22 '24 16:04 jsturtevant

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Sep 23 '24 03:09 k8s-triage-robot