Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a cluster creation option for proxy #2223

Closed
hanlins opened this issue Apr 28, 2021 · 5 comments
Closed

Need a cluster creation option for proxy #2223

hanlins opened this issue Apr 28, 2021 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@hanlins
Copy link
Member

hanlins commented Apr 28, 2021

What would you like to be added:
Need to introduce a new cluster creation option for deploying kind cluster that requires proxy.

Why is this needed:
Proxy is required for various reasons, one of them would be we want the kind cluster to pull images using a specified proxy server. Currently, we've already got proxy support through environment variables, but that is implicit, especially for users who use the kind library instead of the kind binary. This issue requests to expose a new CreateWithProxy option in pkg/cluster/createoption.go so we can pass the proxy settings to kind cluster explicitly instead of using env vars.

With this new cluster creation option, we don't need to set the env var in our customized binary or ask the users to set it given that we're persisting the proxy configs in some file instead of the environment variables.

@hanlins hanlins added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 28, 2021
@BenTheElder
Copy link
Member

Hmm. Well we could certainly consider this at the library level, but as a tool the env is really the only standardized way we could found outside of a browser format that is actually javascript.

@hanlins
Copy link
Member Author

hanlins commented Apr 29, 2021

Hi @BenTheElder, thanks for getting back. In our concrete use case, we have a CLI binary that will do many things including deploying a kind cluster (involving the kind library). We need to optionally enable kind node for pulling images through proxy, at the same time we also need to check with some infrastructure. Currently if user set environment variables for our CLI (or we set it on the fly) then the traffic towards infrastructure is also proxied, which is not ideal. And it could well be we want kind to pull images from proxy server A, but our CLI need to talk to infra through proxy server B. I personally think adding a new proxy option for kind can give me more flexibility to handle these cases.

@aojea
Copy link
Contributor

aojea commented May 4, 2021

if the need is to pull images with proxy maybe that can be patched directly in containerd, use registry mirrorrs... or using a local registry that pulls from the proxy .

@BenTheElder
Copy link
Member

BenTheElder commented May 14, 2021

Yeah, if this is specifically intended for pulling images, I think there are actually already better options for this targeting the container runtime specifically, we should not proxy the other node traffic through an image proxy.

@BenTheElder BenTheElder added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Jul 29, 2021
@BenTheElder
Copy link
Member

I suggest configuring containerd mirrors instead, which is already possible with existing kind functionality. See #2875 for tracking the future of configuring this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

3 participants