是否提示,kubernetes中链接了什么消息:
The Service "skudns" is invalid:spec.clusterIP: invalid value '': the provided range does not match the current range
在那个
DNS_SERVICE_IP = 10.3.0.10
和SERVICE_IP_RANGE = 10.3.0.0/16
我的IP地址:
K8S_SERVICE_IP: 10.3.0.1
MASTER_HOST: 192.168.0.139
ETCD_ENDPOINT=ETCD_CLUSTER=http://192.169.0.139:2379,http://192.168.0.107:2379
POD_NETWORK: 10.2.0.0/16
SERVICE_IP_RANGE: 10.3.0.0/24
DNS_SERVICE_IP: 10.3.0.10
ADVERTISE_IP: 192.168.0.139
最佳答案
/16
为255.255.0.0的means a subnet mask(而不是/24
为255.255.255.0)
错误消息来自 pkg/registry/service/ipallocator/allocator_test.go#L196-L198
if !network.IP.Equal(cidr.IP) || network.Mask.String() != cidr.Mask.String() {
t.Fatalf("mismatched networks: %s : %s", network, cidr)
}
主机网络掩码(如果主机是Windows,则在
ipconfig
中看到,或者 ifconfig
as in this script)可能与kubernetes使用的cidr掩码不同。尝试使用
/24
进行测试。另请参阅issue 5 (Network comportment)
最后,OP batazor确认in the comments是Kubernetes方面的一个问题:
kubernetes updated from version 1.0.3 to 1.0.6 and got
docker0
mask to 255.255.255.0 This is some sort of magic.
关于docker - Kubernetes:spec.clusterIP:无效值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34173253/