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
kubeadm should support proxy configuration via parameters #1053
Comments
some explanations of how the current code in kubeadm works:
so right now i'm pretty sure you can do this on Linux:
(single quotes are important)
try the above solution. but i'd agree that env variables are inconvenient in general. for the *_proxy case we are dealing with a Unix-ism here. |
while that may be right, this may create problems for kubeadm AND kubectl. I run kubeadm and kubectl calls from ansible, and with initialization AND kubectl calls i have to wrap bash -c calls around my kube* calls since the shell module does not execute a "real" bash, which results in really nasty wrappers. example:
My Expectation would be:
|
let's say it another way. sadly we cannot expect that environment variables are easy to set or respected in configuration management tools, or your shell does not respect them. |
any reason to not use
https://docs.ansible.com/ansible/2.6/user_guide/playbooks_environment.html |
In that specific point: It does not work. But the more general issue is (imo), that the execution environment may be an extremely sanitized version. I COULD hack around shell/command deficiences, but that is (imo) not a good architecture style AND it can create problems/insecurities. |
Example with kubectl (indentation is broken here):
This Task will not work. neither with the command nor with the shell module. Is it a bug? Yes. But there i could do --kubeconfig=/etc/kubernetes/admin.conf. And there may be other environments out there which do not support environments as well for whatever reason :-) |
how about a test |
this is not a ansible problem. that will be every time a problem, when a executed command does not support more environment variables. neither via export nor via shell variable. this should be a global parameter, which
|
if you are not using ansible this works fine:
if you are using ansible and the AFAIK, this is the first time someone requests this feature. contributions are always welcome too! |
I'm going to close this one, b/c behavior exists today that allows folks todo what is being asked for. If you have a proposed PR we'd happily review. |
What keywords did you search in kubeadm issues before filing this one?
proxy
Is this a BUG REPORT or FEATURE REQUEST?
Feature Request
I want that following environment parameters can be alternatively defined as parameters to kubeadm:
since http and https may be different proxies, it should be different parameters. and no_proxy shall support ip ranges.
Versions
kubeadm version (use
kubeadm version
):kubeadm version: &version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.1", GitCommit:"b1b29978270dc22fecc592ac55d903350454310a", GitTreeState:"clean", BuildDate:"2018-07-17T18:50:16Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Environment:
kubectl version
):Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.1", GitCommit:"b1b29978270dc22fecc592ac55d903350454310a", GitTreeState:"clean", BuildDate:"2018-07-17T18:53:20Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-07T23:08:19Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Debian 9, OpenTelekom Cloud, Elastic Computing Instance.
root@debian9kub01:/home/linux# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
uname -a
):Linux debian9kub01 4.9.0-7-amd64 kubeadm join on slave node fails preflight checks #1 SMP Debian 4.9.110-3+deb9u1 (2018-08-03) x86_64 GNU/Linux
What happened?
Proxies can only be defined with Environment variables. This is inconvienent and problematic when you rollout with kubeadm via scripts and configuration management tools.
What you expected to happen?
Parameters for kubeadm (and documentation for that) for defining http/https proxies and ranges where no proxy should be used.
How to reproduce it (as minimally and precisely as possible)?
try to rollout kubernetes via kubeadm and internet access only with http proxies and do not use environment variables
The text was updated successfully, but these errors were encountered: