Unable to get to service using the master url

5/17/2018

I used kubeadm init to build the cluster (one of the reference I used: https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ ), cluster came up everything looks good.

NAME                 STATUS    ROLES     AGE       VERSION   EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION              CONTAINER-RUNTIME
abc-kubemaster01   Ready     master    5d        v1.10.2   <none>        CentOS Linux 7 (Core)   3.10.0-862.2.3.el7.x86_64   docker://17.12.1-ce
abc-kubemaster02   Ready     <none>    5d        v1.10.2   <none>        CentOS Linux 7 (Core)   3.10.0-862.2.3.el7.x86_64   docker://17.12.1-ce
abc-kubenode01     Ready     <none>    5d        v1.10.2   <none>        CentOS Linux 7 (Core)   3.10.0-862.2.3.el7.x86_64   docker://17.12.1-ce
abc-kubenode02     Ready     <none>    5d        v1.10.2   <none>        CentOS Linux 7 (Core)   3.10.0-862.2.3.el7.x86_64   docker://17.12.1-ce

I have a service running as NodePort

kind: Service
apiVersion: v1
metadata:
  name: xyz-edge
  namespace: qa
  labels:
    project: xyz
spec:
  selector:
    app: xyz-edge
  type: NodePort
  ports:
  - name: http
    port: 9876
    nodePort: 30300

But, I am unable to access this service using this URL http://abc-kubemaster01:30300/health, but I am able to see it using http://abc-kubenode01:30300/health I checked to see if the master is tainted using this command, but this is what I would expect, since I dont want to schedule any application pods on master01. Any ideas as to why the service is not working using the master url.

kubectl describe node abc-kubemaster01
Name:               abc-kubemaster01
Roles:              master
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/os=linux
                    kubernetes.io/hostname=abc-kubemaster01
                    node-role.kubernetes.io/master=
Annotations:        flannel.alpha.coreos.com/backend-data={"VtepMAC":"ee:32:e0:8e:fa:74"}
                    flannel.alpha.coreos.com/backend-type=vxlan
                    flannel.alpha.coreos.com/kube-subnet-manager=true
                    flannel.alpha.coreos.com/public-ip=10.3.4.03
                    node.alpha.kubernetes.io/ttl=0
                    volumes.kubernetes.io/controller-managed-attach-detach=true
Taints:             node-role.kubernetes.io/master:NoSchedule

I checked to see the following based on comment about kube proxy I got, to check if it is running on master or not

 k get pods -n=kube-system -o wide | grep proxy
kube-proxy-7xhbr                             1/1       Running   0          6d        10.123.24.104   abc-kubemaster02
kube-proxy-jd45s                             1/1       Running   0          6d        10.123.24.105   abc-kubekubenode01
kube-proxy-r84wn                             1/1       Running   0          6d        10.123.24.103   abc-kubemaster01
kube-proxy-zzks2                             1/1       Running   0          6d        10.123.24.106   abc-kubenode02
-- sbolla
kubernetes

0 Answers