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 cannot join control plane node via --config flag #89499

Closed
stv0g opened this issue Mar 26, 2020 · 4 comments
Closed

kubeadm cannot join control plane node via --config flag #89499

stv0g opened this issue Mar 26, 2020 · 4 comments

Comments

@stv0g
Copy link

@stv0g stv0g commented Mar 26, 2020

What happened: kubeadm currently fails to join a control plane node in case all settings are provided via a kubeadm configuration file.

What you expected to happen: Joining a new control plane node should be possible without the --control-plane flag

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

Given is the following configuration file:

---
apiVersion: kubeadm.k8s.io/v1beta2
kind: JoinConfiguration
discovery:
  bootstrapToken:
    apiServerEndpoint: "api.k8s:6443"
    token: xxxxxxxxxxxxxx
    cACertHashes: [ ]
    unsafeSkipCAVerification: true

controlPlane:
  certificateKey: yyyyyyyyyyyyyyyyyy

When joining a node via: `kubeadm join --config kubeadm-join-config.yaml

I get the following error:

[preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when control-plane flag is not set.

Adding the --control-plane flag: kubeadm join --control-plane --config kubeadm-join-config.yaml yields:

can not mix '--config' with arguments [control-plane]
To see the stack trace of this error execute with --v=5 or higher

Anything else we need to know?:

Relevant code locations:

Environment:

  • Kubernetes version: v1.17.3 (06ad960)
  • Cloud provider or hardware configuration: baremetal, x86_86, 768GB DDR, 2x 16C/32T Xeon Gold
  • OS: CentOS 8.1
  • Kernel: Linux node1.k8s.jupyter.rwth-aachen.de 5.5.11-1.el8.elrepo.x86_64 #1 SMP Fri Mar 20 10:38:49 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: kubeadm
  • Network plugin and version (if this is a network-related bug): none
@stv0g stv0g added the kind/bug label Mar 26, 2020
@stv0g

This comment has been minimized.

Copy link
Author

@stv0g stv0g commented Mar 26, 2020

/sig cluster-lifecycle

@stv0g

This comment has been minimized.

Copy link
Author

@stv0g stv0g commented Mar 26, 2020

This seems like an easy fix. If nobody objects, I would remove the check here:

if !opt.controlPlane {

@neolit123

This comment has been minimized.

Copy link
Member

@neolit123 neolit123 commented Mar 26, 2020

the warning is false; your config will still be respected. so not passing --control-plane, while only passing --config is fine.

we are tracking the issue here:
kubernetes/kubeadm#2065

and a fix will be available in 1.18.1, but cannot be backported to 1.17*

/close

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

@k8s-ci-robot k8s-ci-robot commented Mar 26, 2020

@neolit123: Closing this issue.

In response to this:

the warning is false; your config will still be respected.
we are tracking the issue here:
kubernetes/kubeadm#2065

and a fix will be available in 1.18.1, but cannot be backported to 1.17*

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.