sealer icon indicating copy to clipboard operation
sealer copied to clipboard

Using add command to instead join, join command exec on node

Open fanux opened this issue 3 years ago • 3 comments

If you want to add node or master on master:

sealer add --nodes x.x.x.x --masters x.x.x.x

If you join node or master on new server:

  1. On the master to get the join token
sealer join token
  1. On node, to join it
sealer join --discovery-token abcdef.1234567890abcdef \
    --discovery-token-ca-cert-hash sha256:1234..cdef --control-plane 1.2.3.4:6443

You can use a different CloudImage on node, for example, you master is x86 but node is ARM:

sealer join --discovery-token abcdef.1234567890abcdef \
    --discovery-token-ca-cert-hash sha256:1234..cdef \
    --control-plane 1.2.3.4:6443 --image kubernetes-arm:1.19.8

fanux avatar Feb 18 '22 03:02 fanux

We need to save Clusterfile to configmap now, and get configmap using discovery-token

fanux avatar Feb 18 '22 03:02 fanux

Multi arch in same cluster, using apply to init cluster. Sealer will auto-detect the arch.

apiVersion: sealer.cloud/v2
kind: Cluster
metadata:
  name: my-cluster
spec:
  image: kubernetes:v1.19.8
  ssh:
    passwd:
    pk: xxx
    pkPasswd: xxx
    user: root
    port: 2222
  hosts:
    - ips: [ 192.168.0.2 ] # this is an ARM host
      roles: [ master ] 
    - ips: [ 192.168.0.3 ]
      roles: [ node,db ]

fanux avatar Feb 24 '22 03:02 fanux

I need this feat! I need this feat! I need this feat!

VinceCui avatar May 24 '22 09:05 VinceCui