K3d: [FEATURE] Add the environment variable parameter to v3

Created on 24 Aug 2020  路  3Comments  路  Source: rancher/k3d

Is your feature request related to a problem or a Pull Request?
https://github.com/rancher/k3d/issues/184

Scope of your request
Allow the user to pass environment to created containers when creating a cluster or nodes.

Some users may require setting e.g. HTTP Proxy configuration for the containers created by k3d.

Describe the solution you'd like

In v1.7.0 there was a --env or -e parameter to specify environment variables for created containers. In v3.0.1 this option isn't available anymore.

Reintroducing this feature for v3 seems intuitive.

Describe alternatives you've considered

I don't see an alternative way for setting environment variables on the container images.

With Docker it's possible to configure container proxy configuration. However, these values aren't picked up by the k3d-containers:

$ docker run --rm -t alpine env | grep PROXY
NO_PROXY=REDACTED
HTTP_PROXY=http://REDACTED:8080
HTTPS_PROXY=http://REDACTED:8080

$ docker exec -t k3d-k3s-default-server-0 env | grep PROXY
$ echo $?
1
enhancement priorithigh

Most helpful comment

@jwhb That looks more like a regression rather than enhancement request.

All 3 comments

@jwhb That looks more like a regression rather than enhancement request.

Hi @jwhb , thanks for opening this issue!
This flag will definitely return asap :+1:

Are there any workarounds for getting k3d/k3s to pull images when behind a corporate proxy

Was this page helpful?
0 / 5 - 0 ratings

Related issues

parqbanq picture parqbanq  路  6Comments

rr-appadaptive picture rr-appadaptive  路  6Comments

blaggacao picture blaggacao  路  5Comments

L0g4n picture L0g4n  路  4Comments

Xenon341 picture Xenon341  路  5Comments