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

kubeadm v1.13 ignores --kubeconfig-dir on phases #1306

Closed
tommyknows opened this issue Dec 6, 2018 · 7 comments
Closed

kubeadm v1.13 ignores --kubeconfig-dir on phases #1306

tommyknows opened this issue Dec 6, 2018 · 7 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@tommyknows
Copy link

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT (?)

Versions

kubeadm version (use kubeadm version):

kubeadm version: &version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.0", GitCommit:"ddf47ac13c1a9483ea035a79cd7c10005ff21a6d", GitTreeState:"clean", BuildDate:"2018-12-03T21:02:01Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}

What happened?

I'm writing a script to automate kubernetes deployments with kubeadm. Up until now, I have used the following command to do all the steps regarding bootstrap-tokens on a remote server:

kubeadm init phase bootstrap-token all --config "$kubeadm_config_file" --kubeconfig "$kubeconfig_file"

With kubeadm v1.13, this does not work anymore - there's no --kubeconfig flag anymore.
I'm now trying to use

kubeadm phase bootstrap-token all --config "$kubeadm_config_file" --kubeconfig-dir "$kubeconfig_dir

This does not work:

can not mix '--config' with arguments [kubeconfig-dir]

I have removed the --config flag (as this may not be relevant in my case), and set $kubeconfig_dir to a path that contains the admin.conf file or giving the path to a valid kubeconfig file directly into this variable.
However, I am always getting the following output:

error execution phase bootstrap-token: failed to load admin kubeconfig: open etc/kubernetes/admin.conf: no such file or directory

What you expected to happen?

I expect kubeadm to either read from the kubeconfig-file (supplied by --kubeconfig-dir), or search the --kubeconfig-dir for a admin.conf file.

How to reproduce it (as minimally and precisely as possible)?

  • have a running kubernetes master
  • copy the kubeconfig file (admin.conf) to some path
  • run `kubeadm init phase bootstrap-token --kubeconfig-dir [KUBECONFIG-PATH]
@yagonobre
Copy link
Member

yagonobre commented Dec 6, 2018

Hi @tommyknows can you post the output of echo $kubeconfig_file?

@yagonobre
Copy link
Member

/kind bug
/priority awaiting-more-evidence

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. labels Dec 6, 2018
@tommyknows
Copy link
Author

tommyknows commented Dec 6, 2018

Well, it's a temp-directory (/tmp/tmp.[something]), created by mktemp.
For example:

ls /tmp/tmp.rTQrPIMhog/
admin.conf  controller-manager.conf scheduler.conf

I've also tried setting $kubeconfig_file to /tmp/tmp.rTQrPIMhog/admin.conf, that doesn't work either.

@yagonobre
Copy link
Member

yagonobre commented Dec 6, 2018

@tommyknows I'll send a pr with the fix soon
/remove-priority awaiting-more-evidence
/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. labels Dec 6, 2018
@k8s-ci-robot
Copy link
Contributor

@yagonobre: Those labels are not set on the issue: priority/

In response to this:

@tommyknows I'll send a pr with the fix sson
/remove-priority awaiting-more-evidence
/priority important-soon

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

@yagonobre: Those labels are not set on the issue: priority/, priority/awaiting-more-evidence

In response to this:

@tommyknows I'll send a pr with the fix soon
/remove-priority awaiting-more-evidence
/priority important-soon

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@yagonobre
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

3 participants