Commit 4d54805c authored by fanux's avatar fanux
Browse files

sleep 30

parent 96fe90a7
No related merge requests found
Showing with 4 additions and 2 deletions
+4 -2
......@@ -48,13 +48,13 @@ func (s *SealosInstaller) InstallMaster0() {
cmd = `mkdir -p ~/.kube && cp /etc/kubernetes/admin.conf ~/.kube/config`
output = Cmd(s.Masters[0], cmd)
cmd = `kubectl apply -f net/calico.yaml`
cmd = `kubectl apply -f net/calico.yaml || true`
output = Cmd(s.Masters[0], cmd)
}
//JoinMasters is
func (s *SealosInstaller) JoinMasters() {
time.Sleep(3 * time.Second)
time.Sleep(30 * time.Second)
cmd := fmt.Sprintf("kubeadm join %s:6443 --token %s --discovery-token-ca-cert-hash %s --experimental-control-plane --certificate-key %s", s.Masters[0], s.JoinToken, s.TokenCaCertHash, s.CertificateKey)
for _, master := range s.Masters[1:] {
......
......@@ -19,6 +19,7 @@ func Cmd(host string, cmd string) []byte {
session, err := Connect(User, Passwd, host)
if err != nil {
fmt.Println(" Error create ssh session failed", err)
panic(1)
return []byte{}
}
defer session.Close()
......@@ -29,6 +30,7 @@ func Cmd(host string, cmd string) []byte {
fmt.Printf("%s\n\n", b)
if err != nil {
fmt.Println(" Error exec command failed", err)
panic(1)
return []byte{}
}
return b
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment