문제 상황
[root@localhost yaml]
W0111 02:54:34.449187 26018 common.go:148] WARNING: could not obtain a bind address for the API Server: no default routes found in "/proc/net/route" or "/proc/net/ipv6_route"; using: 0.0.0.0
W0111 02:54:34.657445 26018 configset.go:348] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
cannot use "0.0.0.0" as the bind address for the API Server
해결 방법
- 현재 route 상태 확인
- 대부분이 default route 가 없는 상태에서 발생
- 혹은 NI(네트워크 인터페이스)가 여러 개인 환경에서 발생
$ ip route
10.128.0.0/16 via 100.100.80.211 dev eth0 proto static metric 100
100.100.0.0/16 dev eth0 proto kernel scope link src 100.100.80.211 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
$ ip route add default via 100.100.80.211
$ ip route
default via 100.100.80.211 dev eth0
10.64.0.0/16 dev weave proto kernel scope link src 10.64.0.1
10.128.0.0/16 via 100.100.80.211 dev eth0 proto static metric 100
100.100.0.0/16 dev eth0 proto kernel scope link src 100.100.80.211 metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
- 혹은 kubeadm 에서 ip 를 지정해서 실행