kubernetes set service cidr and pod cidr the same

ぃ、小莉子 提交于 2019-11-30 04:15:31

问题


When we use kubeadm to set up a k8s cluster, there are two options to config:

--pod-network-cidr

--service-cidr (default ‘10.96.0.0/12’)

Question is:

  1. If I use 10.244.0.0./12 for pod-network-cidr, do I need to save that IP range for Kubernetes? What happens if we already start to use 10.244.0.0/12 for other machines.

  2. Can I set service-cidr and the pod-network-cidr the same range? I don't understand how service-cidr works.


回答1:


To reply briefly:

    1. You do have to reserve both the pod-network range and the service network range. You can't use those on your LAN (and you can't have routes to it). Both ranges are configurable so you can pick something that is not used. Use ipcalc if you are unsure.
    1. You have to use separate ranges.

Check out these slides for explanation about the different networks in play.



来源:https://stackoverflow.com/questions/45903123/kubernetes-set-service-cidr-and-pod-cidr-the-same

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!