Giter VIP home page Giter VIP logo

Comments (2)

k82cn avatar k82cn commented on May 19, 2024

@Javatar81 , according to iptables output, the nodePort should be 32173. can you share you yml file? Regarding DNS, did you deploy kube-dns in cluster?

from kube-mesos-framework.

Javatar81 avatar Javatar81 commented on May 19, 2024

Yes indeed, the nodePort is 32173, but there is no process listening on this port:

netstat -tulpn | fgrep 32173

returns empty result.

This is the complete output of iptables-save:

iptables-save | fgrep kubernetes
-A PREROUTING -m comment --comment "kubernetes service portals" -j KUBE-SERVICES
-A OUTPUT -m comment --comment "kubernetes service portals" -j KUBE-SERVICES
-A POSTROUTING -m comment --comment "kubernetes postrouting rules" -j KUBE-POSTROUTING
-A KUBE-NODEPORTS -p tcp -m comment --comment "kube-system/kubernetes-dashboard:http" -m tcp --dport 32173 -j KUBE-MARK-MASQ
-A KUBE-NODEPORTS -p tcp -m comment --comment "kube-system/kubernetes-dashboard:http" -m tcp --dport 32173 -j KUBE-SVC-3MCIRW5DISVHFVDN
-A KUBE-POSTROUTING -m comment --comment "kubernetes service traffic requiring SNAT" -m mark --mark 0x4000/0x4000 -j MASQUERADE
-A KUBE-SEP-I4NJUYDW2N6N7NAT -s 192.168.100.126/32 -m comment --comment "default/kubernetes:https" -j KUBE-MARK-MASQ
-A KUBE-SEP-I4NJUYDW2N6N7NAT -p tcp -m comment --comment "default/kubernetes:https" -m recent --set --name KUBE-SEP-I4NJUYDW2N6N7NAT --mask 255.255.255.255 --rsource -m tcp -j DNAT --to-destination 192.168.100.126:6443
-A KUBE-SERVICES -d 10.10.10.253/32 -p tcp -m comment --comment "kube-system/kubernetes-dashboard:http cluster IP" -m tcp --dport 80 -j KUBE-SVC-3MCIRW5DISVHFVDN
-A KUBE-SERVICES -d 10.10.10.1/32 -p tcp -m comment --comment "default/kubernetes:https cluster IP" -m tcp --dport 443 -j KUBE-SVC-NPX46M4PTMTKRN6Y
-A KUBE-SERVICES -m comment --comment "kubernetes service nodeports; NOTE: this must be the last rule in this chain" -m addrtype --dst-type LOCAL -j KUBE-NODEPORTS
-A KUBE-SVC-NPX46M4PTMTKRN6Y -m comment --comment "default/kubernetes:https" -m recent --rcheck --seconds 180 --reap --name KUBE-SEP-I4NJUYDW2N6N7NAT --mask 255.255.255.255 --rsource -j KUBE-SEP-I4NJUYDW2N6N7NAT
-A KUBE-SVC-NPX46M4PTMTKRN6Y -m comment --comment "default/kubernetes:https" -j KUBE-SEP-I4NJUYDW2N6N7NAT
-A OUTPUT -m comment --comment "kubernetes service portals" -j KUBE-SERVICES
-A KUBE-FIREWALL -m comment --comment "kubernetes firewall for dropping marked packets" -m mark --mark 0x8000/0x8000 -j DROP
-A KUBE-SERVICES -d 10.10.10.253/32 -p tcp -m comment --comment "kube-system/kubernetes-dashboard:http has no endpoints" -m tcp --dport 80 -j REJECT --reject-with icmp-port-unreachable

This is the yml for dashboard:

kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  labels:
    app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kube-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kubernetes-dashboard
  template:
    metadata:
      labels:
        app: kubernetes-dashboard
      # Comment the following annotaion if Dashboard must not be deployed on master
      #annotations:
        #scheduler.alpha.kubernetes.io/tolerations: |
         # [
          #  {
           #   "key": "dedicated",
            #  "operator": "Equal",
             # "value": "master",
             # "effect": "NoSchedule"
           # }
         # ]
    spec:
      containers:
      - name: kubernetes-dashboard
        image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.4.2
        imagePullPolicy: Always
        ports:
        - containerPort: 9090
          protocol: TCP
        args:
          # Uncomment the following line to manually specify Kubernetes API server Host
          # If not specified, Dashboard will attempt to auto discover the API server and connect
          # to it. Uncomment only if the default does not work.
        - --apiserver-host=http://192.168.100.126:8888
        livenessProbe:
          httpGet:
            path: /
            port: 9090
          initialDelaySeconds: 30
          timeoutSeconds: 30

kind: Service
apiVersion: v1
metadata:
  labels:
    app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kube-system
spec:
  type: NodePort
  ports:
- port: 80
  name: http
  targetPort: 9090
  selector:
    app: kubernetes-dashboard

The system pods:

kubectl get pods --namespace=kube-system
NAME                                   READY     STATUS    RESTARTS   AGE
kube-dns-v19-m07oj                     3/3       Running   0          1d
kubernetes-dashboard-266040510-cuvdg   1/1       Running   0          1d

The system services:

kubectl get services --namespace=kube-system
NAME                   CLUSTER-IP     EXTERNAL-IP   PORT(S)         AGE
kube-dns               10.10.10.10    <none>        53/UDP,53/TCP   1d
kubernetes-dashboard   10.10.10.253   <nodes>   80/TCP          1d

The command:

kubectl get endpoints --namespace=kube-system

returns empty result.

The kubernetes proxy /api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard/

returns:

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "endpoints \"kubernetes-dashboard\" not found",
  "reason": "NotFound",
  "details": {
    "name": "kubernetes-dashboard",
    "kind": "endpoints"
  },
  "code": 404
}

The dashboard, however, is known by api server /api/v1/namespaces/kube-system/services/kubernetes-dashboard/:

{
  "kind": "Service",
  "apiVersion": "v1",
  "metadata": {
    "name": "kubernetes-dashboard",
    "namespace": "kube-system",
    "selfLink": "/api/v1/namespaces/kube-system/services/kubernetes-dashboard",
    "uid": "11c4ceb6-aa5e-11e6-99ee-005056b56e98",
    "resourceVersion": "126120",
    "creationTimestamp": "2016-11-14T11:32:48Z",
    "labels": {
      "app": "kubernetes-dashboard"
    }
  },
  "spec": {
    "ports": [
      {
        "name": "http",
        "protocol": "TCP",
        "port": 80,
        "targetPort": 9090,
        "nodePort": 32173
      }
    ],
    "selector": {
      "app": "kubernetes-dashboard"
    },
    "clusterIP": "10.10.10.253",
    "type": "NodePort",
    "sessionAffinity": "None"
  },
  "status": {
    "loadBalancer": {}
  }
}

To answer your question regarding dns. I've deployed it according to your getting started guide.

My setup is:

  • Three nodes
  • All have installation of: mesos 1.0.1, etcd v3.0.9 and docker 1.12.1 and latest kubernetes yum packages + kubernetes mesos from git (newest revision)
  • All nodes run etcd, mesos and docker
  • One node runs km apiserver, controller-manager and scheduler

from kube-mesos-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.