[GH-ISSUE #544] How to run on k8s #160

Closed
opened 2026-03-07 20:45:33 +03:00 by kerem · 10 comments
Owner

Originally created by @ysomawar on GitHub (Nov 18, 2021).
Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/544

Please, describe your question in details.
I am trying to run on k8s environment, but UI is not loading. I am getting just dbeaver logo on top left corner of browser. No error on pod.

following is a yml file user for deployment,

apiVersion: apps/v1
kind: Deployment
metadata:
  name: db-deployment
  labels:
    app: db
spec:
  replicas: 1
  selector:
    matchLabels:
      app: db
  template:
    metadata:
      labels:
        app: db
    spec:
      containers:
      - name: db
        image: dbeaver/cloudbeaver:latest
        ports:
        - containerPort: 8978
          name: cbeaver-http
        env:
        - name: CB_ADMIN_USER
          value: admin
        - name: CB_ADMIN_PASSWORD
          value: admin
        - name: CB_SERVER_NAME
          value: test
        #- name: CB_SERVER_URL
        #  value: https://db.dlgsbox05.serverlessplatform.co.uk/
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: db-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - host: v451.dlgsbox05.serverlessplatform.co.uk
    http:
      paths:
      - backend:
          service:
            name: db-service
            port:
              number: 8080
        path: /db1
        pathType: ImplementationSpecific
  - host: '*.db.dlgsbox05.serverlessplatform.co.uk'
    http:
      paths:
      - backend:
          service:
            name: db-service
            port:
              number: 8080
        path: /db1
        pathType: ImplementationSpecific

---
apiVersion: v1
kind: Service
metadata:
  name: db-service
spec:
  selector:
    app: db
  ports:
    - protocol: TCP
      port: 8080
      name: cbeaver-http
      targetPort: 8978

Could somebody assist me on this.

Originally created by @ysomawar on GitHub (Nov 18, 2021). Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/544 Please, describe your question in details. I am trying to run on k8s environment, but UI is not loading. I am getting just dbeaver logo on top left corner of browser. No error on pod. following is a yml file user for deployment, ``` apiVersion: apps/v1 kind: Deployment metadata: name: db-deployment labels: app: db spec: replicas: 1 selector: matchLabels: app: db template: metadata: labels: app: db spec: containers: - name: db image: dbeaver/cloudbeaver:latest ports: - containerPort: 8978 name: cbeaver-http env: - name: CB_ADMIN_USER value: admin - name: CB_ADMIN_PASSWORD value: admin - name: CB_SERVER_NAME value: test #- name: CB_SERVER_URL # value: https://db.dlgsbox05.serverlessplatform.co.uk/ --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: db-ingress annotations: kubernetes.io/ingress.class: nginx annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: rules: - host: v451.dlgsbox05.serverlessplatform.co.uk http: paths: - backend: service: name: db-service port: number: 8080 path: /db1 pathType: ImplementationSpecific - host: '*.db.dlgsbox05.serverlessplatform.co.uk' http: paths: - backend: service: name: db-service port: number: 8080 path: /db1 pathType: ImplementationSpecific --- apiVersion: v1 kind: Service metadata: name: db-service spec: selector: app: db ports: - protocol: TCP port: 8080 name: cbeaver-http targetPort: 8978 ``` Could somebody assist me on this.
kerem 2026-03-07 20:45:33 +03:00
Author
Owner

@yoavo-datricks commented on GitHub (Nov 18, 2021):

You are serving CB under /db1 so I think you must add CB_SERVER_URL with /db1 at the end of it.
That's why it's there.

<!-- gh-comment-id:972883037 --> @yoavo-datricks commented on GitHub (Nov 18, 2021): You are serving CB under /db1 so I think you must add CB_SERVER_URL with /db1 at the end of it. That's why it's there.
Author
Owner

@ysomawar commented on GitHub (Nov 18, 2021):

Hello @yoavo-datricks , currently I had commented the "CB_SERVER_URL" variable, but I tried by adding /db1 at the end of CB_SERVER_URL, but still same issue. UI is not loading.
Please assist me on this.

<!-- gh-comment-id:972894572 --> @ysomawar commented on GitHub (Nov 18, 2021): Hello @yoavo-datricks , currently I had commented the "CB_SERVER_URL" variable, but I tried by adding /db1 at the end of CB_SERVER_URL, but still same issue. UI is not loading. Please assist me on this.
Author
Owner

@kseniiaguzeeva commented on GitHub (Nov 24, 2021):

Could you please send a screenshot and web console details? It will help me to assess the issue and find a solution.

<!-- gh-comment-id:977823762 --> @kseniiaguzeeva commented on GitHub (Nov 24, 2021): Could you please send a screenshot and web console details? It will help me to assess the issue and find a solution.
Author
Owner

@yoavo-datricks commented on GitHub (Nov 24, 2021):

You shouldn't do "nginx.ingress.kubernetes.io/rewrite-target: /" and have the CB_SERVER_URL with the /db1.
You shouldn't do any rewrite-target at all, Just have the ingress path and variable identical and it works.

<!-- gh-comment-id:977942768 --> @yoavo-datricks commented on GitHub (Nov 24, 2021): You shouldn't do "nginx.ingress.kubernetes.io/rewrite-target: /" and have the CB_SERVER_URL with the /db1. You shouldn't do any rewrite-target at all, Just have the ingress path and variable identical and it works.
Author
Owner

@ysomawar commented on GitHub (Nov 24, 2021):

Hello @yoavo-datricks ,

I tried by removing rewrite-target and CB_SERVER_URL with the /db1, but not working. I am getting 404,

image

My Updated yaml,

apiVersion: apps/v1
kind: Deployment
metadata:
  name: db-deployment
  labels:
    app: db
spec:
  replicas: 1
  selector:
    matchLabels:
      app: db
  template:
    metadata:
      labels:
        app: db
    spec:
      containers:
      - name: db
        image: dbeaver/cloudbeaver:latest
        ports:
        - containerPort: 8978
          name: cbeaver-http
        env:
        - name: CB_ADMIN_USER
          value: admin
        - name: CB_ADMIN_PASSWORD
          value: admin
        - name: CB_SERVER_NAME
          value: test
        - name: CB_SERVER_URL
          value: https://v451.dlgsbox05.serverlessplatform.co.uk/db1
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: db-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
  - host: v451.dlgsbox05.serverlessplatform.co.uk
    http:
      paths:
      - backend:
          service:
            name: db-service
            port:
              number: 8080
        path: /db1
        pathType: ImplementationSpecific
  - host: '*.db.dlgsbox05.serverlessplatform.co.uk'
    http:
      paths:
      - backend:
          service:
            name: db-service
            port:
              number: 8080
        path: /db1
        pathType: ImplementationSpecific

---
apiVersion: v1
kind: Service
metadata:
  name: db-service
spec:
  selector:
    app: db
  ports:
    - protocol: TCP
      port: 8080
      name: cbeaver-http
      targetPort: 8978
<!-- gh-comment-id:977987442 --> @ysomawar commented on GitHub (Nov 24, 2021): Hello @yoavo-datricks , I tried by removing rewrite-target and CB_SERVER_URL with the /db1, but not working. I am getting 404, ![image](https://user-images.githubusercontent.com/88495035/143267231-e5487e03-7651-4769-88e3-9fd853b6d288.png) My Updated yaml, ``` apiVersion: apps/v1 kind: Deployment metadata: name: db-deployment labels: app: db spec: replicas: 1 selector: matchLabels: app: db template: metadata: labels: app: db spec: containers: - name: db image: dbeaver/cloudbeaver:latest ports: - containerPort: 8978 name: cbeaver-http env: - name: CB_ADMIN_USER value: admin - name: CB_ADMIN_PASSWORD value: admin - name: CB_SERVER_NAME value: test - name: CB_SERVER_URL value: https://v451.dlgsbox05.serverlessplatform.co.uk/db1 --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: db-ingress annotations: kubernetes.io/ingress.class: nginx spec: rules: - host: v451.dlgsbox05.serverlessplatform.co.uk http: paths: - backend: service: name: db-service port: number: 8080 path: /db1 pathType: ImplementationSpecific - host: '*.db.dlgsbox05.serverlessplatform.co.uk' http: paths: - backend: service: name: db-service port: number: 8080 path: /db1 pathType: ImplementationSpecific --- apiVersion: v1 kind: Service metadata: name: db-service spec: selector: app: db ports: - protocol: TCP port: 8080 name: cbeaver-http targetPort: 8978 ```
Author
Owner

@ysomawar commented on GitHub (Nov 24, 2021):

Hi @kseniiaguzeeva,

If I use the above yaml with "nginx.ingress.kubernetes.io/rewrite-target: /" and the CB_SERVER_URL with the /db1. I am getting following screen,

db2

Please help me to solve the issue.

<!-- gh-comment-id:977989108 --> @ysomawar commented on GitHub (Nov 24, 2021): Hi @kseniiaguzeeva, If I use the above yaml with "nginx.ingress.kubernetes.io/rewrite-target: /" and the CB_SERVER_URL with the /db1. I am getting following screen, ![db2](https://user-images.githubusercontent.com/88495035/143268046-847eed5f-ab87-45ad-b684-2472b2782260.PNG) Please help me to solve the issue.
Author
Owner

@yoavo-datricks commented on GitHub (Nov 25, 2021):

@ysomawar apologies. I see that in our configuration we haven't set CB_SERVER_URL at all.
However, in the cloudbeaver.conf file which we build using an external configmap we set the rootURI parameter to be "/cdb/ and this way is working for us.

<!-- gh-comment-id:979112463 --> @yoavo-datricks commented on GitHub (Nov 25, 2021): @ysomawar apologies. I see that in our configuration we haven't set CB_SERVER_URL at all. However, in the cloudbeaver.conf file which we build using an external configmap we set the rootURI parameter to be "/cdb/ and this way is working for us.
Author
Owner

@kseniiaguzeeva commented on GitHub (Dec 1, 2021):

Looks like it is a similar issue with https://github.com/dbeaver/cloudbeaver/issues/240 and something is wrong with the config files. Could you please send file cloudbeaver.conf (here or to ksenia@jkiss.org) to me?

<!-- gh-comment-id:983584693 --> @kseniiaguzeeva commented on GitHub (Dec 1, 2021): Looks like it is a similar issue with https://github.com/dbeaver/cloudbeaver/issues/240 and something is wrong with the config files. Could you please send file `cloudbeaver.conf` (here or to ksenia@jkiss.org) to me?
Author
Owner

@kseniiaguzeeva commented on GitHub (Jan 12, 2022):

There is no update in the ticket during the long time. Please feel free to ask to reopen the ticket if it is still actual for you.

<!-- gh-comment-id:1010782467 --> @kseniiaguzeeva commented on GitHub (Jan 12, 2022): There is no update in the ticket during the long time. Please feel free to ask to reopen the ticket if it is still actual for you.
Author
Owner

@bsgrigorov commented on GitHub (Feb 9, 2022):

Check out this helm chart https://github.com/bsgrigorov/dbeaver-helm. It still needs work, but it's a start.

<!-- gh-comment-id:1033602700 --> @bsgrigorov commented on GitHub (Feb 9, 2022): Check out this helm chart https://github.com/bsgrigorov/dbeaver-helm. It still needs work, but it's a start.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#160
No description provided.