Charts: [stable/pgadmin] How to run ingress sub path

Created on 26 Feb 2020  路  5Comments  路  Source: helm/charts

Hello.

I want to use pgadmin with http://my.company.com/pgadmin URL.

But I think there's some problem in here.

my value file is here.

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    nginx.ingress.kubernetes.io/rewrite-target: /$2
  hosts:
    - host: my.company.com
      paths: 
        - /pgadmin(/|$)(.*)
  tls:
    - secretName: ingress-tls
      hosts:
        - my.company.com

env:
  email: [email protected]
  password: 1qaz2wsx

persistentVolume:
  enabled: true
  storageClass: "nfs-client-stage"

when I access my.company.com/pgadmin, URL moved to my.company.com/login?next=%2F
and 404 error.

How can I use sub path? Is it possible?

Most helpful comment

figure it out self.

service:
  port: 443

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/configuration-snippet: |
      proxy_set_header X-Script-Name /pgadmin-stage;
  hosts:
    - host: my.company.net
      paths: 
        - /pgadmin-stage
  tls:
    - secretName: ingress-tls
      hosts:
        - my.company.net

All 5 comments

@rowanruseler can you help me?

@dpage can you help me?

figure it out self.

service:
  port: 443

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/configuration-snippet: |
      proxy_set_header X-Script-Name /pgadmin-stage;
  hosts:
    - host: my.company.net
      paths: 
        - /pgadmin-stage
  tls:
    - secretName: ingress-tls
      hosts:
        - my.company.net

Thanks @Hokwang , helped me.

Was this page helpful?
0 / 5 - 0 ratings