cetic / helm-pgadmin

Helm Chart for pgAdmin
Apache License 2.0
16 stars 23 forks source link

[Question] cetic/helm-pgadmin - How to connect to service #12

Open garfieldcoked opened 5 years ago

garfieldcoked commented 5 years ago

Describe the bug I am fairly new to kubernetes and pgadmin. I have a cluster running in GKE and I have deployed a postgres cluster using https://github.com/zalando/postgres-operator. I have successfully deployed the pgadmin application, logged in and now trying to add a server.

Version of Helm and Kubernetes: Chart: 0.1.10 Helm: v2.14.2 K8s: v1.13.7-gke.15

What happened: Not sure how to connect to postgres instance, i tried using the name of the kubernetes service but did not work. I instead got error message server connection closed. (Apologies I took a screenshot before uninstalling and I thought it was of the error but it was not)

Screenshot 2019-10-05 at 08 40 36

I also noticed in the browser console there were errors about unauthorized, not sure what that is related to

What you expected to happen: Successful connection to database :)

How to reproduce it (as minimally and precisely as possible): Install latest helm chart with supplementary values file:

---
pgadmin:
  ## pgadmin admin user
  username: my-username
  ## pgadmin admin password
  password: my-password
  ## pgadmin config, Any custom environment variabls. Settings in config.py can be overriden with an environment variable using the prefix: PGADMIN_CONFIG_
  ## eg turn off enhanced cookie protection for default AKS, loadbalancer installation
  config:
    - name: "PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION"
      value: "False"

## Expose the pgAdmin service to be accessed from outside the cluster (LoadBalancer service).
## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it.
## ref: http://kubernetes.io/docs/user-guide/services/
##
service:
  name: my-service-name

Anything else we need to know: I am also running istio, so I am connecting to pgadmin using a virtual service

I am not sure how to connect to the postgres instance. I am not sure if pgadmin is trying to connect from within the cluster if so I assumed the service name would resolve to correct pod or if postgres service has to be exposed to outside traffic. Any information on this such as service type would be helpful.

Thanks

banzo commented 5 years ago

Hi @garfieldcoked thank you for your detailed issue!

We have an example use of this chart here: https://github.com/cetic/fadi/blob/master/USERGUIDE.md#2-prepare-the-database-to-store-measurements

We are not using Istio though, so I cannot help you there. Maybe try to reproduce the issue without Istio (and/or in a Minikube cluster)?

@FabianSteels if you have any related insights on Istio, feel free to chime in