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

[QUESTION]: Is it possible to join server nodes to a k3s cluster that was not installed with k3sup? #347

Closed
2 of 4 tasks
atye opened this issue Oct 6, 2021 · 5 comments
Closed
2 of 4 tasks

Comments

@atye
Copy link

atye commented Oct 6, 2021

I installed a v1.19.15+k3s2 HA cluster using this command:

K3S_TOKEN=SECRET k3s server --cluster-init

I set my KUBECONFIG env to the kubeconfig of the k3s cluster and ran the following:

# k3sup join --server --user root --ip <new_node> --server-ip <existing_node> --ssh-key <path>
Running: k3sup join
Server IP: <existing_node>
K109d55471dfee0883866c9f0454cd929988cd3520bfe5b60b49f1d26e61076514e::server:SECRET

The above finished with no errors but kubectl get nodes shows only the single, existing node. Does k3sup supporting joining nodes to a cluster that was not installed by k3sup? Or am I doing something wrong?

# kubectl get nodes
NAME       STATUS   ROLES         AGE   VERSION
<name>   Ready    etcd,master   35m   v1.19.15+k3s2

Expected Behaviour

I am not sure what is expected because I am not sure if this should work or not, but it looks like there should at least be an error.

Current Behaviour

The current behaviour, that doesn't error out, implies that the join was successful but it wasn't according to the kubectl get nodes output.

Are you a GitHub Sponsor (Yes/No?)

  • Yes
  • No

Possible Solution

I'm not quite looking for a solution. I would just like to know if this is supported or if I am doing something wrong.

Steps to Reproduce

  1. Install a k3s cluster via K3S_TOKEN=SECRET k3s server --cluster-init
  2. Set KUBECONFIG env to the kubeconfig of the k3s cluster
  3. Run k3sup join ...
  4. Run kubectl get nodes to see only the original node

Context

I have an application with an installation process that manually installs k3s with the help of the install script at https://get.k3s.io/. We are looking into HA and came across k3sup to see if we can easily add server nodes to the cluster.

Since we are using that installer script, we are not installing k3s with the --cluster-init flag so our process may have to change regardless of this issue. But for the sake of this issue, I did try installing a cluster with that flag and using k3sup to join a server.

Your Environment

  • What Kubernetes distribution are you using?
# kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-12T14:18:45Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.15+k3s2", GitCommit:"0fbbc5af7c17003cc9259b741f6d672ae93d0cd0", GitTreeState:"clean", BuildDate:"2021-10-05T18:58:35Z", GoVersion:"go1.15.14", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.21) and server (1.19) exceeds the supported minor version skew of +/-1

  • What OS or type or VM are you using for your cluster? Where is it hosted? (for k3sup install/join):

CentOS Linux 7 (Core)
These are VMs in our own vCenter environment.

  • Operating System and version (e.g. Linux, Windows, MacOS): Linux
# uname -a
Linux <name> 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

"Be part of the solution"

Subject to approval, are you willing to work on a Pull Request for this issue or feature request?

  • Yes
  • No

Yes but maybe. If this isn't supported then we may look into adding server nodes via k3s directly.

@alexellis
Copy link
Owner

Hi @atye

k3sup doesn't install k3s in any particular way that I can think of here.

Can you fill out the issue template completely please, or edit your question?

Alex

@atye
Copy link
Author

atye commented Oct 6, 2021

Hi @alexellis thanks for the quick response.

I hope my details aren't confusing but I added some questions to the beginning and I believe I've filled out everything.

The scenario is that I created a k3s cluster manually (meaning not using k3sup) and I'm wondering if it's possible to use k3sup to add servers/agents to that cluster. The join command seemed to not work for me but that could be because I am doing something wrong. If anything else is required, I'll be happy to provide it.

@atye atye closed this as completed Oct 11, 2021
@alexellis
Copy link
Owner

There's nothing special that k3sup is setting so the answer would be yes.

But there's also many ways to run k3s and many versions. If you want to set up a 1:1 zoom with me to debug your environment, I'm fine with that.

Otherwise try reinstalling and making sure all nodes have the same version

https://calendly.com/alexellis

@alexellis
Copy link
Owner

@atye are you running into this? #339

@atye
Copy link
Author

atye commented Oct 12, 2021

No, there were DNS issues on my machines. curl runs in quiet mode so I tried what k3sup was doing manually without quiet mode and found the issue. Thank you for the help anyway.

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

No branches or pull requests

2 participants