---
title: Charmhub | Deploy PgBouncer K8s using Charmhub - The Open Operator Collection
description: Deploy the latest version of PgBouncer K8s as a Kubernetes Operator on
  any cloud.
url: https://charmhub.io/pgbouncer-k8s/docs/h-manage-app
---

# PgBouncer K8s

[Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")

* [Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")
* [Databases](https://charmhub.io/?filter=databases)

Platform:

1/stable 593

```
juju deploy pgbouncer-k8s --channel 1/stable --trust
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Relevant links

* [Homepage](https://ubuntu.com/data/postgresql)

---

#### Contacts

##### Maintainers

+ [Canonical Data Platform](mailto:data-platform@lists.launchpad.net)

* [Submit a bug](https://github.com/canonical/pgbouncer-k8s-operator/issues)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

# How to manage related applications

## Modern `postgresql_client` interface:

Relations to new applications are supported via the “[postgresql\_client](https://github.com/canonical/charm-relation-interfaces/blob/main/interfaces/postgresql_client/v0/README.md)” interface. To create a relation:

```
juju integrate pgbouncer-k8s application
```

To remove a relation:

```
juju remove-relation pgbouncer-k8s application
```

All listed on CharmHub applications are available [here](https://charmhub.io/pgbouncer-k8s/integrations), e.g.:

* [postgresql-test-app](https://charmhub.io/postgresql-test-app)
* [mattermost-k8s](https://charmhub.io/mattermost-k8s)

## Legacy `pgsql` interface:

This charm also supports the legacy relation via the `pgsql` interface. Please note that these interface is deprecated.

```
juju relate pgbouncer-k8s:db myapplication-k8s
```

Also extended permissions can be requested using `db-admin` endpoint:

```
juju relate pgbouncer-k8s:db-admin myapplication-k8s
```

## Internal operator user

To rotate the internal router passwords, the relation with backend-database should be removed and related again. That process will generate a new user and password for the application, while retaining the requested database and data.

```
juju remove-relation postgresql-k8s pgbouncer-k8s

juju integrate postgresql-k8s pgbouncer-k8s
```

---
