kubernetesã¯ã©ã¹ã¿ã¯DHCPã¯å©ç¨ããstatic ipã§ä½æãã¹ã
件å以ä¸ã®ãã¨ã¯ãªããã¾ãæ®éã®ææ§ãªããããããããã¨ãããã¨ãããªã
ã§ä½ã£ãã¯ã©ã¹ã¿ã ããæ®å¿µãªããOSåèµ·åæã«ã¶ã£ãããã¦ãã¾ã£ãã
ææããã¦DHCPã§ãã£ã¦ããããetcdããapiserverããããå
ã®IPã¢ãã¬ã¹ã«æ¢ãã«ãã£ã¦ãã¾ããå¿
è¦ã³ã³ãã¼ãã³ããã¾ãã§èµ·åããªãã
ãã°ãã¿ã¦ã¿ãã¨ã
```
Jul 3 18:30:56 master01 kubelet[1437]: E0703 18:30:56.729641 1437 controller.go:115] failed to ensure node lease exists, will retry in 7s, error: Get https://lb01.mshome.net:6443/apis/coordination.k8s.io/v1beta1/namespaces/kube-node-lease/leases/master01.mshome.net?timeout=10s: dial tcp: lookup lb01.mshome.net on 192.168.217.225:53: read udp 192.168.217.233:46188->192.168.217.225:53: i/o timeout
```
ã¿ãããªæãã§å¤ãIPã¢ãã¬ã¹(192.168.217.233)ã使ããã¨ãã¦ããã®ããããã
/etc/kubernetes/manifests/etcd.yaml ã¨ããè¦ãã¨ç¢ºãã«IPã¢ãã¬ã¹ããã¿æ¸ãããã¦ãã®ã§ãä¿®æ£ãã¦ã¿ããã©ãç¶æ³ãã¾ãããããã
ãã¹ãå解決ã§å¤±æãã¦ããã®ã§ãcoreDNSãããããã®ã ãã©ã
ãããã«ãã¦ããipããããã³ã«ããããä¿®æ£ããã®æéã§ãããªãã®ã§ãstatic ipã§ä½ãç´ããã¨ã«ããã
ã¯ã©ã¹ã¿ãæ§æãããã¼ãã®æ
å ±ãã©ãã«ãã©ã®ããã«æ ¼ç´ããã¦ãããã¯æ°ã«ãªãã®ã§ãæ£ããåããããããã¦ãããããã
ããããDHCPã§ããã£ããã¦å¤æããã®ããããã¥ã¡ã³ãã«
```
It is not recommended to use an IP address directly in a cloud environment.
```
ã¨ãã£ãã®ã§ãã¯ã©ã¦ãã ã¨ãããã«IPå¶å¾¡ã§ããªããããã¹ãåã§è§£æ±ºã§ããç°å¢ãªããããã ãªã£ã¦å¤æãã¦ãã¾ã£ãã®ã ãã©ãããLoadBalancerã®æ¡ä»¶ã ã£ãã®ã§ã誤èªã§ããã
ãã£ã±minikubeã¨ãããã¼ã¸ãã«é ¼ããªãèªåã¯ã©ã¹ã¿çµãã§ã¿ãã¨ãããããäºæãã¬ã¨ããã§ã¯ã¾ã£ã¦èå³æ·±ãã§ã