缺陷: 最新版本sealos init 安装k8s 失败 (#778) (#780)

Fixes #691

(cherry picked from commit 2b4578385c)

Co-authored-by: ldseraph <ld.seraph@163.com>
This commit is contained in:
cuisongliu
2021-12-29 11:58:12 +08:00
committed by GitHub
co-authored by ldseraph
parent 78f66fed6c
commit 03208ccfb6
+1
View File
@@ -138,6 +138,7 @@ func (s *SealosInstaller) appendAPIServer() error {
etcHostMap := fmt.Sprintf("%s %s", utils.IPFormat(s.Masters[0]), v1.APIServer)
file, err := os.OpenFile(etcHostPath, os.O_RDWR|os.O_APPEND, 0666)
if err != nil {
logger.Error("open %s file error %s", etcHostPath, err)
os.Exit(1)
}
defer file.Close()