cloudnativer / kube-install

一键安装k8s(kubernetes):二進位離線方式部署,支持定時安裝、添加與銷毀node、銷毀與修復master、一鍵卸載集羣等。Install k8s (kubernetes): one click offline installation of highly available multiple kubernetes cluster, supports schedule installation, addition of nodes, rebuild of kubernetes master, and uninstallation of clusters.
Apache License 2.0
422 stars 118 forks source link

使用0.9.0-beta安装1.28后显示集群状态未知 #47

Open laodao opened 10 months ago

laodao commented 10 months ago

操作系统为ubuntu server20,安装完毕后,coredns故障,状态为CrashLoopBackOff ,经排查为ubuntu的nameserver没有正确配置,似乎kube-install安装程序不能正确配置dns。

cloudnativer commented 7 months ago

There are many ways to work around this issue, some are listed here: --Add the following to your kubelet config yaml: resolvConf: (or via command line flag --resolv-conf deprecated in 1.10). Your “real” resolv.conf is the one that contains the actual IPs of your upstream servers, and no local/loopback address. This flag tells kubelet to pass an alternate resolv.conf to Pods. For systems using systemd-resolved, /run/systemd/resolve/resolv.conf is typically the location of the “real” resolv.conf, although this can be different depending on your distribution. --Disable the local DNS cache on host nodes, and restore /etc/resolv.conf to the original. --A quick and dirty fix is to edit your Corefile, replacing forward . /etc/resolv.conf with the IP address of your upstream DNS, for example forward . 8.8.8.8. But this only fixes the issue for CoreDNS, kubelet will continue to forward the invalid resolv.conf to all default dnsPolicy Pods, leaving them unable to resolve DNS.

cloudnativer commented 7 months ago

Thank you for your feedback. We have fixed this issue in the new version (https://github.com/cloudnativer/kube-install/releases/tag/v0.9.0) .