{"id":20780725,"url":"https://github.com/farrajota/kubernetes-postgres-pgbouncer","last_synced_at":"2026-04-28T16:33:34.533Z","repository":{"id":202488824,"uuid":"279145489","full_name":"farrajota/kubernetes-postgres-pgbouncer","owner":"farrajota","description":"Tutorial on how to setup a connection pool using pgbouncer for PostgreSQL","archived":false,"fork":false,"pushed_at":"2020-08-21T22:29:26.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T05:56:42.500Z","etag":null,"topics":["kubernetes","kustomize","pgbouncer","postgres"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/farrajota.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-07-12T20:48:08.000Z","updated_at":"2025-08-05T02:50:09.000Z","dependencies_parsed_at":"2026-01-08T01:11:36.983Z","dependency_job_id":null,"html_url":"https://github.com/farrajota/kubernetes-postgres-pgbouncer","commit_stats":null,"previous_names":["farrajota/kubernetes-postgres-pgbouncer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/farrajota/kubernetes-postgres-pgbouncer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farrajota%2Fkubernetes-postgres-pgbouncer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farrajota%2Fkubernetes-postgres-pgbouncer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farrajota%2Fkubernetes-postgres-pgbouncer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farrajota%2Fkubernetes-postgres-pgbouncer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farrajota","download_url":"https://codeload.github.com/farrajota/kubernetes-postgres-pgbouncer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farrajota%2Fkubernetes-postgres-pgbouncer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kubernetes","kustomize","pgbouncer","postgres"],"created_at":"2024-11-17T13:38:59.906Z","updated_at":"2026-04-28T16:33:34.501Z","avatar_url":"https://github.com/farrajota.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setting a connection pool using PgBouncer for PostgreSQL\n\nSetting up a connection pool for PostgreSQL does not have to be a complicated process.\nActually, it can be a reasonably simple procedure if you know enough. In this repo you'll\nfind a simple tutorial on how to deploy PgBouncer alongside a Postgres database in a\nkubernetes environment.\n\n\u003e Note: This tutorial uses kustomize to configure and setup the deployment manifest.\n        If you never used it before, it is a [simple and powerful tool](https://kustomize.io/)\n        to customize kubernetes deployments.\n\n## Requirements\n\n- kubernetes cluster (e.g., miniconda, k3s/k3d, kind)\n- kubectl (1.16+ kustomize)\n- Linux / MacOS\n\n# Setting up the environment / resources\n\n1. Start the kubernetes cluster\n```bash\nminikube start\n```\n\n2. Generate k8s deploy manifest\n```bash\nkubectl kustomize \u003e deploy.yaml\n```\n\n3. Create the k8s resources\n```bash\nkubectl create -f deploy.yaml\n```\n\n4. Test the setup\n```bash\nkubectl -n database exec -it pg-0 -- bash -c 'PGPASSWORD=password_user1 psql -U user1 -h pgbouncer -p 5439 -d sandbox -c \" SELECT * from test\"'\n```\n\n5. Destroy the k8s resources\n```bash\nkubectl delete -f deploy.yaml\n```\n\n6. Clean remaining artifacts\n```bash\nrm deploy.yaml\n```\n\n## References\n\n- https://www.pgbouncer.org/config.html\n- https://gitlab.com/aztek-io/oss/containers/pgbouncer-container\n- https://www.cybertec-postgresql.com/en/pgbouncer-authentication-made-easy/\n- https://www.depesz.com/2012/12/02/what-is-the-point-of-bouncing/\n- https://www.enterprisedb.com/postgres-tutorials/challenges-setting-maxconnections-and-why-you-should-use-connection-pooler\n\n# License\n\n[MIT License](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarrajota%2Fkubernetes-postgres-pgbouncer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarrajota%2Fkubernetes-postgres-pgbouncer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarrajota%2Fkubernetes-postgres-pgbouncer/lists"}