Whenever I try to access kube-ui from my desktops(not a kube cluster node) web browser Kubernetes returns:
Error: 'dial tcp 18.16.24.2:8080: connection refused'
Trying to reach: 'http://18.16.24.2:8080/'
I can access the APIServer and all the rest API without any issue from my desktop.
Environment:
The URL I am using was obtained from doing:
$ kubeclt cluster-info
Kubernetes master is running at http://172.28.128.8:8080
KubeDNS is running at http://172.28.128.8:8080/api/v1/proxy/namespaces/kube-system/services/kube-dns
KubeUI is running at http://172.28.128.8:8080/api/v1/proxy/namespaces/kube-system/services/kube-ui
Configure View produces:
$ kubectl config view
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: http://172.28.128.8:8080
name: centos
contexts:
- context:
cluster: centos
user: centos
name: centos
current-context: centos
kind: Config
preferences: {}
users:
- name: centos
user:
password: <password>
username: admin
I am able to access the kube-ui if I access it from a minion node using its internal IP address. However, it doesn't seem to be reporting anything: no nodes, services..etc. The internal ip address was found by:
$ kubectl describe svc kube-ui --namespace=kube-system
Name: kube-ui
Namespace: kube-system
Labels: k8s-app=kube-ui,kubernetes.io/cluster-service=true,kubernetes.io/name=KubeUI
Selector: k8s-app=kube-ui
Type: ClusterIP
IP: 10.0.17.103
Port: <unnamed> 80/TCP
Endpoints: 18.16.24.2:8080
Session Affinity: None
No events.
Any ideas as to why I can't access it from my desktop via the URL provided by kubeclt cluster info
? Could it be because I am running with insecure-skip-tls-verify?
Flannel wasn't setup on the master node, which was the issue. The documentation can be a little misleading/confussing: https://github.com/kubernetes/kubernetes/blob/v1.2.0-alpha.5/docs/getting-started-guides/fedora/flannel_multi_node_cluster.md
It does say to setup flannel on all Kubernetes nodes. However, the node setup section is directly after the Master Node setup section, so I was unsure if this applied to the master node as well. They appeared to be two separate sections, so I thought maybe this didn't apply to the master.
Also, when you get down to the "Test the cluster flannel configuration" the second bullet point states:
If you set up a 1 master and 3 nodes cluster, you should see one block for each node showing the subnets they have been assigned.
Then shows curling the etcd that only produces 3 address. If you have 1 master and 3 nodes, then it should probably show 4 addresses. This lead me to believe in this doc that master and nodes where different.
Figured I would highlight my confusion on these points in case anyone else has the same experience.