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

Feature: when master0 breaks down, other masters can use sealos cluster management commands #3859

Closed
MuJianning opened this issue Sep 7, 2023 · 38 comments
Assignees
Labels
kind/feature New feature or request

Comments

@MuJianning
Copy link

MuJianning commented Sep 7, 2023

What is the problem this feature will solve?

当master0发生故障时,其他master可以使用sealos集群管理命令。

When master0 breaks down, other masters can use sealos cluster management commands.

我的master0发生故障,无法恢复。但是其他master不能使用sealos集群管理命令。即使在其他master安装sealos工具(apt install sealos)也因缺失~/.sealos/和/var/lib/sealos/data/default/rootfs/registry/等重要信息而无法正常工作。

My master0 breaks down and cannot be recovered. But other masters cannot use sealos cluster management commands. Even if the sealos tool is installed on other masters (apt install sealos), it cannot function properly due to missing important information such as ~/. sealos/ and /var/lib/sealos/data/default/rootfs/registry/.

If you have solution,please describe it

目前没有解决方案,只能重建集群。

No solution for now but rebuild cluster.

What alternatives have you considered?

用kubeadm取代sealos。

Replace sealos with kubeadm.

@MuJianning MuJianning added the kind/feature New feature or request label Sep 7, 2023
@ghostloda
Copy link
Collaborator

/assign

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


/assign

@cuisongliu
Copy link
Collaborator

用kubeadm取代sealos。 这个方式不可行,只需要同步配置即可。
至于registry我感觉你安装的时候就不应该只安装到master0节点。

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Replace sealos with kubeadm. This method is not feasible, only the configuration needs to be synchronized.
As for the registry, I feel that you should not only install it to the master0 node when you install it.

@ghostloda
Copy link
Collaborator

用kubeadm取代sealos。 这个方式不可行,只需要同步配置即可。

添加switch命令,取代异常的master0, 例如:sealos switch --master 192.168.0.5 。
switch在后台将.sealos/ 同步到新的master1。这样是否可以?

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Replace sealos with kubeadm. This method is not feasible, only the configuration needs to be synchronized.

Add the switch command to replace the abnormal master0, for example: sealos switch --master 192.168.0.5.
The switch synchronizes .sealos/ to the new master1 in the background. Is this possible?

@bxy4543
Copy link
Member

bxy4543 commented Sep 7, 2023

不需要新添加命令,在集群初始化和加入节点操作成功后同步master ~/.sealos数据就可以的

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


No need to add new commands, just synchronize the master ~/.sealos data after the cluster initialization and node joining operations are successful

@ghostloda
Copy link
Collaborator

不需要新添加命令,在集群初始化和加入节点操作成功后同步master ~/.sealos数据就可以的

我明白了,保持master节点之间的~/.sealos数据同步。

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


No need to add new commands, just synchronize the master ~/.sealos data after the cluster initialization and node joining operations are successful

I get it, keep ~/.sealos data in sync between master nodes.

@gogogo2156
Copy link

我们也有同样需求,我觉得仓库信息/var/lib/sealos/data/default/rootfs/registry/ 等数据也需要同步的

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


We also have the same requirement, I think warehouse information /var/lib/sealos/data/default/rootfs/registry/ and other data also need to be synchronized

@cuisongliu
Copy link
Collaborator

我们也有同样需求,我觉得仓库信息/var/lib/sealos/data/default/rootfs/registry/ 等数据也需要同步的

这个当前支持的,你安装集群的时候 设置role=registry 就可以了

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


We also have the same requirement, I think warehouse information /var/lib/sealos/data/default/rootfs/registry/ and other data also need to be synchronized

This is currently supported, you can set role=registry when you install the cluster

@gogogo2156
Copy link

能否详细介绍一下如何设置role=registry,或者提供文档?谢谢

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Can you explain in detail how to set role=registry, or provide documentation? Thanks

@cuisongliu
Copy link
Collaborator

sealos gen 然后把节点role添加 registry 然后apply即可。

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


sealos gen and then add the node role to registry and then apply.

@gogogo2156
Copy link

gogogo2156 commented Sep 8, 2023

apiVersion: apps.sealos.io/v1beta1
kind: Cluster
metadata:
name: default
spec:
hosts:
- ips:
- 192.168.63.128:22
- 192.168.63.127:22
- 192.168.63.126:22
roles:
- master
- amd64
- registry
- ips:
- 192.168.63.125:22
- 192.168.63.124:22
roles:
- node
- amd64
image:
- labring/kubernetes:v1.26.1
- labring/helm:v3.11.0
- labring/calico:v3.25.0
ssh:
pk: /root/.ssh/id_rsa
port: 22
status: {}
是这样添加吗?添加后是什么效果,会在3个master上都安装仓库,并互相同步吗?谢谢

@cuisongliu
Copy link
Collaborator

apiVersion: apps.sealos.io/v1beta1
kind: Cluster
metadata:
name: default
spec:
hosts:

  • ips:
  • 192.168.63.128:22
  • 192.168.63.127:22
  • 192.168.63.126:22
    roles:
  • master
  • amd64
  • registry
  • ips:
  • 192.168.63.125:22
  • 192.168.63.124:22
    roles:
  • node
  • amd64
    image:
  • labring/kubernetes:v1.26.1
  • labring/helm:v3.11.0
  • labring/calico:v3.25.0
    ssh:
    pk: /root/.ssh/id_rsa
    port: 22
    status: {}
    是这样添加吗?添加后是什么效果,会在3个master上都安装仓库,并互相同步吗?谢谢

是的,每次安装app会往三个仓库发送镜像。可能会慢,但是如果master0坏了 你只要把每个节点的sealos.hub对应的IP改掉就好了

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


apiVersion: apps.sealos.io/v1beta1
kind: Cluster
metadata:
name: default
spec:
hosts:
-ips:

  • 192.168.63.128:22
  • 192.168.63.127:22
  • 192.168.63.126:22
    roles:
  • master
  • amd64
  • registry
    -ips:
  • 192.168.63.125:22
  • 192.168.63.124:22
    roles:
  • node
  • amd64
    image:
  • labring/kubernetes:v1.26.1
  • labring/helm:v3.11.0
  • labring/calico:v3.25.0
    ssh:
    pk: /root/.ssh/id_rsa
    port: 22
    status: {}
    is this added? What is the effect after adding, will the warehouse be installed on all 3 masters and synchronized with each other? Thanks

Yes, every time the app is installed, images will be sent to three warehouses. It may be slow, but if master0 is broken, you only need to change the IP corresponding to the sealos.hub of each node.

@gogogo2156
Copy link

好的,这个功能是从sealos哪个版本开始支持的?

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Ok, from which version of sealos is this function supported?

@cuisongliu
Copy link
Collaborator

好的,这个功能是从sealos哪个版本开始支持的?

#2096 这个PR

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Ok, from which version of sealos is this function supported?

#2096 this PR

@gogogo2156
Copy link

好的,谢谢。

不需要新添加命令,在集群初始化和加入节点操作成功后同步master ~/.sealos数据就可以的

我明白了,保持master节点之间的~/.sealos数据同步。

这个功能是需要新开发的吧?

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


OK, thanks.

There is no need to add new commands, just synchronize the master ~/.sealos data after the cluster initialization and node joining operations are successful.

I understand, keep ~/.sealos data synchronized between master nodes.

Does this function need to be newly developed?

@bxy4543
Copy link
Member

bxy4543 commented Sep 10, 2023

好的,谢谢。

不需要新添加命令,在集群初始化和加入节点操作成功后同步master ~/.sealos数据就可以的

我明白了,保持master节点之间的~/.sealos数据同步。

这个功能是需要新开发的吧?

是的,也可以手动执行 sealos scp -r master src target 命令来同步~/.sealos数据到其他master节点

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


OK, thank you.

There is no need to add a new command, just synchronize the master ~/.sealos data after the cluster initialization and node joining operations are successful.

I understand, keep ~/.sealos data synchronized between master nodes.

Does this function need to be newly developed?

Yes, you can also manually execute the sealos scp -r master src target command to synchronize ~/.sealos data to other master nodes

Copy link

stale bot commented Nov 9, 2023

This issue has been automatically closed because we haven't heard back for more than 60 days, please reopen this issue if necessary.

@gogogo2156
Copy link

请问这个功能做完了吗?是否计划合入到新的版本中?谢谢

@stale stale bot removed the response-expired label Nov 13, 2023
@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Is this function completed? Are there plans to incorporate it into the new version? Thanks

@bxy4543
Copy link
Member

bxy4543 commented Nov 13, 2023

最新版应该已经支持了 @gogogo2156

@bxy4543 bxy4543 closed this as completed Nov 13, 2023
@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The latest version should already support @gogogo2156

@gogogo2156
Copy link

gogogo2156 commented Nov 14, 2023

@bxy4543 最新版是指v4.3.7吗?需要去配置开启吗?谢谢

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Does the latest version refer to v4.3.7? Do I need to configure it to enable it? Thanks

@xpy3306
Copy link

xpy3306 commented Nov 5, 2024

怎么在安装时,用命令指定部署3个registry

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


How to use the command to specify the deployment of three registries during installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants