- kube-proxy问题:
Apr 12 09:42:49 compute1 kube-proxy[12965]: E0412 09:42:49.602342 12965 reflector.go:205] pkg/proxy/config/api.go:33:
Failed to list *api.Endpoints: Get http://109.105.46.94:8080/api/v1/endpoints?resourceVersion=0: dial tcp 109.105.46.94:
8080: getsockopt: connection refused
Apr 12 09:42:49 compute1 kube-proxy[12965]: E0412 09:42:49.602373 12965 reflector.go:205] pkg/proxy/config/api.go:30:
Failed to list *api.Service: Get http://109.105.46.94:8080/api/v1/services?resourceVersion=0: dial tcp 109.105.46.94:808
0: getsockopt: connection refused
问题原因:启动参数不正确,参数中使用了下划线,改成短线
- service设置NodePort类型,NodeIP+Port方式无法访问
问题原因:service 里面没有 nodePort
- port :service 的port
- targetPort pod 的port
- nodePort 主机开放的端口,需要在service-node-port-range(apiserver启动参数)内
- DNS 搭建以后,和dns容器不在统一台物理机上的其他容器,域名无法解析服务,查看 /etc/resolv.conf 内容如下,
search default.svc.cluster.local svc.cluster.local cluster.local nwlab nameserver 192.168.3.100 options ndots:5
问题原因:flannel 和docker 配置不一致:修改子网时,先重启flannel服务,再重启docker服务,
ip -a 查看配置, flannel10 和docker0要在一个网段,如: