<p>I am trying to deploy zipkin within k8s. I am using elasticsearch (version 6.8.8) as storage. The deployment works fine and the server starts. However, I only can access the server with a port-forward.</p>
<p><code>$ kubectl -n ns-zipkin port-forward zipkin-bdcf7f78b-shd9p 8888:9411</code></p>
<p>After that I can access <code>http://localhost:8888/zipkin/</code></p>
<p>What could be the reason? Already the deployment of the service does not get an endpoint (see  in output below) which I would expect.</p>
<p>deployment.yaml</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: zipkin
  labels:
    app: zipkin
spec:
  replicas: 1
  selector:
    matchLabels:
      app: zipkin
  template:
    metadata:
      name: zipkin
      labels:
        app: zipkin
    spec:
      containers:
        - name: zipkin
          image: openzipkin/zipkin:2.21
          imagePullPolicy: Always
          ports:
            - containerPort: 9411
              protocol: TCP
          env:
          - name: STORAGE_TYPE
            value: elasticsearch
          - name: ES_HOSTS
            value: https://my-es-host:9243
          - name: ES_USERNAME
            value: myUser
          - name: ES_PASSWORD
            value: myPassword
          - name: ES_HTTP_LOGGING
            value: HEADERS
          readinessProbe:
            httpGet:
              path: /api/v2/services
              port: 9411
            initialDelaySeconds: 5
            timeoutSeconds: 3
</code></pre>
<p><code>$ kubectl -n ns-zipkin describe deployment zipkin</code></p>
<pre><code>Name:                   zipkin
Namespace:              ns-zipkin
CreationTimestamp:      Fri, 04 Sep 2020 09:16:38 +0200
Labels:                 app=zipkin
Annotations:            deployment.kubernetes.io/revision: 1
Selector:               app=zipkin
Replicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
  Labels:  app=zipkin
  Containers:
   zipkin:
    Image:      openzipkin/zipkin:2.21
    Port:       9411/TCP
    Host Port:  0/TCP
    Readiness:  http-get http://:9411/api/v2/services delay=5s timeout=3s period=10s #success=1 #failure=3
    Environment:
      STORAGE_TYPE:     elasticsearch
      ES_HOSTS:         https://my-es-host:9243
      ES_USERNAME:      myUser
      ES_PASSWORD:      myPassword
      ES_HTTP_LOGGING:  HEADERS
    Mounts:             &lt;none&gt;
  Volumes:              &lt;none&gt;
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      True    MinimumReplicasAvailable
  Progressing    True    NewReplicaSetAvailable
OldReplicaSets:  &lt;none&gt;
NewReplicaSet:   zipkin-6788f4d555 (1/1 replicas created)
Events:
  Type    Reason             Age   From                   Message
  ----    ------             ----  ----                   -------
  Normal  ScalingReplicaSet  43m   deployment-controller  Scaled up replica set zipkin-6788f4d555 to 1
</code></pre>
<p>service.yaml</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: zipkin
  labels:
    app.kubernetes.io/name: zipkin
    app.kubernetes.io/instance: zipkin
    app: zipkin
spec:
  type: ClusterIP
  ports:
    - port: 9411
      targetPort: 9411
      protocol: TCP
      name: http
  selector:
    app.kubernetes.io/name: zipkin
    app.kubernetes.io/instance: zipkin
    app: zipkin
</code></pre>
<p><code>$ kubectl -n ns-zipkin describe service zipkin</code></p>
<pre><code>Name:              zipkin
Namespace:         ns-zipkin
Labels:            app=zipkin
                   app.kubernetes.io/instance=zipkin
                   app.kubernetes.io/name=zipkin
Annotations:       Selector:  app.kubernetes.io/instance=zipkin,app.kubernetes.io/name=zipkin,app=zipkin
Type:              ClusterIP
IP:                CONCRETE-IP-ADDRESS
Port:              http  9411/TCP
TargetPort:        9411/TCP
Endpoints:         &lt;none&gt;
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>
<p>ingress.yaml</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: zipkin
  labels:
    app.kubernetes.io/name: zipkin
    app.kubernetes.io/instance: zipkin
    app.kubernetes.io/managed-by: zipkin
  annotations:
    kubernetes.io/ingress.class: nginx
    kubernetes.io/tls-acme: &quot;true&quot;
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    nginx.ingress.kubernetes.io/proxy-read-timeout: &quot;3600&quot;
    nginx.ingress.kubernetes.io/proxy-body-size: &quot;0&quot;
    nginx.ingress.kubernetes.io/cors-allow-methods: &quot;PUT, GET, POST, OPTIONS, DELETE&quot;
    nginx.ingress.kubernetes.io/cors-allow-origin: &quot;*&quot;
    nginx.ingress.kubernetes.io/enable-cors: &quot;true&quot;
spec:
  tls:
    - hosts:
        - ns-zipkin.my-host
      secretName: .my-host
  rules:
    - host: ns-zipkin.my-host
      http:
        paths:
          - path: /zipkin/?(.*)
            backend:
              serviceName: zipkin
              servicePort: 80
</code></pre>
<p><code>$ kubectl -n ns-zipkin describe ingress</code></p>
<pre><code>Name:             zipkin
Namespace:        ns-zipkin
Address:          
Default backend:  default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)
TLS:
  .my-host terminates ns-zipkin.my-host
Rules:
  Host                                   Path  Backends
  ----                                   ----  --------
  ns-zipkin.my-host  
                                         /zipkin/?(.*)   zipkin:80 (&lt;none&gt;)
Annotations:                             kubernetes.io/ingress.class: nginx
                                         kubernetes.io/tls-acme: true
                                         nginx.ingress.kubernetes.io/cors-allow-methods: PUT, GET, POST, OPTIONS, DELETE
                                         nginx.ingress.kubernetes.io/cors-allow-origin: *
                                         nginx.ingress.kubernetes.io/enable-cors: true
                                         nginx.ingress.kubernetes.io/proxy-body-size: 0
                                         nginx.ingress.kubernetes.io/proxy-read-timeout: 3600
                                         nginx.ingress.kubernetes.io/rewrite-target: /$1
Events:
  Type     Reason     Age   From                      Message
  ----     ------     ----  ----                      -------
  Normal   CREATE     6s    nginx-ingress-controller  Ingress ns-zipkin/zipkin
  Warning  BadConfig  6s    cert-manager              Could not determine issuer for ingress due to bad annotations: failed to determine issuer name to be used for ingress resource
  Normal   CREATE     6s    nginx-ingress-controller  Ingress ns-zipkin/zipkin
  Normal   CREATE     6s    nginx-ingress-controller  Ingress ns-zipkin/zipkin
  Normal   CREATE     6s    nginx-ingress-controller  Ingress ns-zipkin/zipkin
  Normal   CREATE     6s    nginx-ingress-controller  Ingress ns-zipkin/zipkin
  Normal   CREATE     6s    nginx-ingress-controller  Ingress ns-zipkin/zipkin
  Normal   CREATE     6s    nginx-ingress-controller  Ingress ns-zipkin/zipkin
  Normal   CREATE     6s    nginx-ingress-controller  Ingress ns-zipkin/zipkin
  Normal   CREATE     6s    nginx-ingress-controller  Ingress ns-zipkin/zipkin
  Normal   CREATE     6s    nginx-ingress-controller  Ingress ns-zipkin/zipkin
</code></pre>

Kavau
<p>The following worked. Sorry, I cannot provide info on all details since I don't know them :( Maybe somebody else can.</p>
<p>deployment.yaml</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: zipkin
  labels:
    app.kubernetes.io/name: zipkin
    app.kubernetes.io/instance: zipkin
    app: zipkin
spec:
  replicas: 1
  selector:
    matchLabels:
      app: zipkin
  template:
    metadata:
      name: zipkin
      labels:
        app: zipkin
    spec:
      containers:
        - name: zipkin
          image: openzipkin/zipkin:2.21
          imagePullPolicy: Always
          ports:
            - containerPort: 9411
              protocol: TCP
          env:
          - name: STORAGE_TYPE
            value: elasticsearch
          - name: ES_HOSTS
            value: https://my-es-host:9243
          - name: ES_USERNAME
            value: myUser
          - name: ES_PASSWORD
            value: myPassword
          - name: ES_HTTP_LOGGING
            value: HEADERS
          readinessProbe:
            httpGet:
              path: /api/v2/services
              port: 9411
            initialDelaySeconds: 5
            timeoutSeconds: 3
            
</code></pre>
<p>service.yaml</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: zipkin
  labels:
    app.kubernetes.io/name: zipkin
    app.kubernetes.io/instance: zipkin
    app: zipkin
spec:
  type: ClusterIP
  ports:
    - port: 9411
      targetPort: 9411
      protocol: TCP
      name: http  &lt;-- DELETED
  selector:
    app.kubernetes.io/name: zipkin    &lt;-- DELETED
    app.kubernetes.io/instance: zipkin    &lt;-- DELETED
    app: zipkin
    
            
</code></pre>
<p>ingress.yaml</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: zipkin
  labels:
    app.kubernetes.io/name: zipkin
    app.kubernetes.io/instance: zipkin
    app.kubernetes.io/managed-by: zipkin
  annotations:
    kubernetes.io/ingress.class: nginx
    kubernetes.io/tls-acme: &quot;true&quot;
    nginx.ingress.kubernetes.io/rewrite-target: /$1    &lt;-- DELETED
    nginx.ingress.kubernetes.io/proxy-read-timeout: &quot;3600&quot;
    nginx.ingress.kubernetes.io/proxy-body-size: &quot;0&quot;
    nginx.ingress.kubernetes.io/cors-allow-methods: &quot;PUT, GET, POST, OPTIONS, DELETE&quot;
    nginx.ingress.kubernetes.io/cors-allow-origin: &quot;*&quot;
    nginx.ingress.kubernetes.io/enable-cors: &quot;true&quot;
spec:
  tls:
    - hosts:
        - ns-zipkin.my-host
      secretName: .my-host
  rules:
    - host: ns-zipkin.my-host
      http:
        paths:
          - path: /  &lt;-- CHANGED
            backend:
              serviceName: zipkin
              servicePort: 9411   &lt;-- CHANGED
</code></pre>
