本系列文章:
git
第一章:九析帶你玩轉 rancher - 安裝篇docker
第二章:九析帶你玩轉 rancher - 導入集羣篇ide
第三章:九析帶你玩轉 rancher - 集成 gitlabgitlab
第四章:九析帶你玩轉 rancher - 集成 harborui
第五章:九析帶你玩轉 rancher - 流水線發佈spa
目錄blog
1 問題描述dns
2 問題解決ip
1 問題描述
在使用 rancher 發佈流水線時,因爲 gitlab 是自定義域名(好比 jiuxi.gitlab.com),致使流水線發佈過程當中老是會報域名解析錯誤:
Could not resolve host: jiuxi.gitlab.com
2 問題解決
定位 coredns configmap 所在 rancher 的項目,通常是 System:
選中 coredns configmap,選擇「升級」菜單:
添加自定義域名解析記錄:
hosts {
10.110.101.100 jiuxi.harbor.org jiuxi.gitlab.com jiuxi.nexus.com
fallthrough
}
再選擇「工做負載」:
選擇「coredns」:
選中 coredns 的 pod,刪除便可(coredns 控制器會自動重建):
自此,流水線自定義域名輕鬆完爆。