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

update exist cluster #1402

Closed
ozbillwang opened this issue Mar 13, 2020 · 4 comments
Closed

update exist cluster #1402

ozbillwang opened this issue Mar 13, 2020 · 4 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@ozbillwang
Copy link

ozbillwang commented Mar 13, 2020

What would you like to be added:

after I create a cluster by kind, I'd like to add one more worker node or master node. but I can't find the option/command to update exist cluster.

change from

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker

to

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker

If I run create command, I will get error

$ kind create cluster --config kind-config-1.yaml
ERROR: node(s) already exist for a cluster with the name "kind"

So how to update exist cluster, such as adding new worker node, change node images/kubernetes version, etc.

Why is this needed:
after I create a cluster by kind, I'd like to add one more worker node or master node. but I can't find the option/command to update exist cluster.

Currently I have to delete and create a new cluster with new configuration

So if we can have an new command update or apply to deal with this request

kind update cluster --config kind-config-1.yaml

or

kind apply cluster --force --config kind-config-1.yaml
@ozbillwang ozbillwang added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 13, 2020
@ozbillwang
Copy link
Author

Second, after I restart my laptop, I found the kind kubernetes cluster doesn't start up automatically.

Now there is no way I can start them again.

$ kind get nodes
kind-worker
kind-worker2
kind-control-plane

$ kind get clusters
kind

$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

$ kubectl get clusters kind
The connection to the server 127.0.0.1:32774 was refused - did you specify the right host or port?

any hints?

@BenTheElder
Copy link
Member

This is a fairly complicated feature that we currently have no intention of developing. It's not necessary for most testing purposes.

For rebooting there is an existing issue in the tracker that I am again working on.

@marlon-sousa
Copy link

Hello,

I have a slightly different question:

I have a KIND cluster and now I developed a new service. This service uses a node port, but this node port is not yet mapped to a host port in the configuration file, because the service has just been developed.
Is there any way in which I could reapply the custom config file to restart the cluster, but now taking in consideration the new port mapping?

If so, I would like to know, because destroying a cluster and them starting a new one with all the deployments involved is very expensive in terms of time.

Thanks,
Marlon

@BenTheElder
Copy link
Member

Hi, it is possible, though not via kind itself or the config, but best discussed in another issue. See e.g. #702 (comment)

Also, if you're on linux you can skip port mapping entirely, but on mac see the discussion there, and the notes in https://kind.sigs.k8s.io/docs/user/loadbalancer/

This particular issue though is one of the reason we don't support reconfiguring, as docker just doesn't support adding port mapping to a container dynamically, you have to re-create anyhow.

If you'd like to discuss further, please file a new support issue, that way we can keep track of it better (e.g. most people are not tracking old closed issues) and help make it more searchable for the next person, thanks!

@BenTheElder BenTheElder self-assigned this Jun 29, 2021
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.
Projects
None yet
Development

No branches or pull requests

3 participants