首页 > 代码库 > 搭建Kubernetes服务集群遇到的问题

搭建Kubernetes服务集群遇到的问题

  • 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

    1. port :service 的port
    2. targetPort pod 的port
    3. nodePort  主机开放的端口,需要在service-node-port-range(apiserver启动参数)内

 

搭建Kubernetes服务集群遇到的问题