Confused Routing - No avaliable host


#1

I try to understand where routing works, but dtab is very simple witch lack of information.

See my dtab:

They found my service (show ip and port), but in the end he not return.

linkerd.yml

runs linkerd in a daemonset, in linker-to-linker mode


apiVersion: v1
kind: ConfigMap
metadata:
   name: l5d-config
data:
   config.yaml: |-
     admin:
       ip: 0.0.0.0
       port: 9990

  namers:
  - kind: io.l5d.k8s
    experimental: true
    host: localhost
    port: 8001

  telemetry:
  - kind: io.l5d.prometheus
  - kind: io.l5d.recentRequests
    sampleRate: 0.25

  usage:
    orgId: linkerd-examples-daemonset

  routers:
  - protocol: http
    label: outgoing
    dtab: |
      /srv        => /#/io.l5d.k8s/poc/http;
      /host       => /srv;
      /svc        => /host;
    interpreter:
      kind: default
      transformers:
      - kind: io.l5d.k8s.daemonset
        namespace: poc
        port: incoming
        service: l5d
    servers:
    - port: 4140
      ip: 0.0.0.0
    service:
      responseClassifier:
        kind: io.l5d.http.retryableRead5XX

  - protocol: http
    label: incoming
    dtab: |
      /srv        => /#/io.l5d.k8s/poc/http;
      /host       => /srv;
      /svc        => /host;
    interpreter:
      kind: default
      transformers:
      - kind: io.l5d.k8s.localnode
    servers:
    - port: 4141
      ip: 0.0.0.0

 ---
apiVersion: extensions/v1beta1
kind: DaemonSet
  metadata:
    labels:
      app: l5d
     name: l5d
  spec:
    template:
      metadata:
        labels:
          app: l5d
      spec:
        volumes:
        - name: l5d-config
          configMap:
            name: "l5d-config"
        containers:
        - name: l5d
          image: buoyantio/linkerd:1.2.0
          env:
          - name: POD_IP
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
          args:
          - /io.buoyant/linkerd/config/config.yaml
          ports:
          - name: outgoing
            containerPort: 4140
            hostPort: 4140
          - name: incoming
            containerPort: 4141
          - name: admin
            containerPort: 9990
          volumeMounts:
          - name: "l5d-config"
            mountPath: "/io.buoyant/linkerd/config"
            readOnly: true

        - name: kubectl
          image: buoyantio/kubectl:v1.4.0
          args:
          - "proxy"
          -  "-p"
          - "8001"
  ---
  apiVersion: v1
  kind: Service
  metadata:
    name: l5d
  spec:
    selector:
      app: l5d
    type: LoadBalancer
    ports:
    - name: outgoing
      port: 4140
    - name: incoming
      port: 4141
    - name: admin
      port: 9990

nginx.yml service

    ---
  kind: ReplicationController
  apiVersion: v1
  metadata:
    name: nginx
  spec:
    replicas: 1
    selector:
      app: nginx
    template:
      metadata:
        labels:
          app: nginx
      spec:
        containers:
        - name: nginx
          image: nginx
          command: ["/bin/sh", "-c"]
          args: ["echo 'Hello, linkerd!' > /usr/share/nginx/html/index.html && nginx -g \"daemon off;\""]
          ports:
          - name: service
            containerPort: 80
  ---
  kind: Service
  apiVersion: v1
  metadata:
    name: nginx
  spec:
    selector:
      app: nginx
    clusterIP: None
    ports:
    - name: http
      port: 80
      targetPort: 80

What is bound path?

I try to find this service with “http://nginx”, my namespace is “poc”, in screenshot i try to find shopping-item, but the same behavior happens with nginx service, version of my linkerd is 1.2.0, and all name ports is nginx

thanks


#2

Hi @Signorini, is it possible you’re running in Minikube?

I tried your configurations twice, once in Minikube and once in a GKE Kubernetes cluster, and I also saw a failure to route in Minikube but a successful delegation in the real cluster. The Linkerd examples configurations will not work properly in Minikube, but we also have example configurations intended specifically for Minikube; see Flavors of Kubernetes for more information on this.


#3

Thanks Eliza to replay.

I use cluster with 3 nodes created in AWS by rancher, my kubectl version is 1.7.7.

The have happened because of interpreter,

interpreter:
kind: default
transformers:
- kind: io.l5d.k8s.daemonset
namespace: poc
port: incoming
service: l5d

I simple remove this part of code and works, I like the understand how the default config works.


#4

Hi @Signorini! Here is a pretty detailed explanation of how the daemonset transformer works: https://buoyant.io/2016/10/14/a-service-mesh-for-kubernetes-part-ii-pods-are-great-until-theyre-not/

If your cluster uses CNI such as Calico, you’ll also want to take a look at Flavors of Kubernetes

Hope this helps!