---
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-units
---

# 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 deploy and manage units

## [Basic Usage](https://charmhub.io/pgbouncer-k8s/docs/h-manage-units#p-28305-basic-usage)

To deploy a single unit of PgBouncer using its default configuration

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

It is customary to use PgBouncer in HA setup. Hence usually more than one unit (preferably an odd number to prohibit a “split-brain” scenario) is deployed. To deploy PgBOuncer in HA mode, specify the number of desired units with the `-n` option.

```
juju deploy pgbouncer-k8s --trust --channel 1/stable -n <number_of_replicas>
```

## [Scaling](https://charmhub.io/pgbouncer-k8s/docs/h-manage-units#p-28305-scaling)

Both scaling-up and scaling-down operations are performed using `juju scale-application`:

```
juju scale-application pgbouncer-k8s <desired_num_of_units>
```

> **Tip**: scaling-down to zero units is supported to safe K8s resources!

---
