1

I'm trying Tekton on a Kind cluster and successfully configured Tekton Dashboard to work with Ingress rules. But I don't have a dedicated domain name, and unlikely to have one later. This Tekton instance will be exposed on a subpath on another domain through another NGINX.

But Tekton Dashboard doesn't seem to work on subpath locations. Tekton Dashboard exposed with Ingress path: / works well, but if I change it to path: /tekton, it doesn't work.

So, is it designed to work only at root path? No support for working on subpath?


P.S. I'm going to use Kind cluster for production too as I do not have access to a Kubernetes cluster. This is small service and we don't need scale, but just CI/CD-as-code. And nowadays it seems all of new CI/CD implementations are designed only for Kubernetes.

eonil
  • 83,476
  • 81
  • 317
  • 516

2 Answers2

2

You can also use the following Ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: tekton-dashboard
  namespace: tekton-pipelines
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^(/[a-z1-9\-]*)$ $1/ redirect;
spec:
  rules:
  - http:
      paths:
        - path: /tekton-dashboard(/|$)(.*)
          pathType: Prefix
          backend:
            service:
              name: tekton-dashboard
              port:
                number: 9097
Erno Marks
  • 21
  • 2
0

Tekton Dashboard does support being exposed on a subpath, it attempts to detect the base URL to use and adapts accordingly. For example, if you run kubectl proxy locally against the target cluster you can then access the Dashboard at http://localhost:8001/api/v1/namespaces/tekton-pipelines/services/tekton-dashboard:http/proxy/

More details about the issue you're encountering would be useful to help debug, e.g. Dashboard version? Is anything loading at all? Ingress controller and config? Any errors in the browser console / network tab, etc.

eonil
  • 83,476
  • 81
  • 317
  • 516
Alan
  • 476
  • 2
  • 6
  • 10
  • You are right. It works well on `kubtctl proxy` under long subpath. It's so clear! My config should have a problem. Thanks and I'll check and try again. – eonil Feb 11 '21 at 06:53