The Crunchy PostgreSQL container supports other forms of cluster deployment, the style of deployment is dictated by setting the PG\_MODE environment variable for the container. In the case of a StatefulSet deployment, that value is set to: PG\_MODE=set
This environment variable is a hint to the container initialization logic as to the style of deployment we intend.
**Step 7** - Testing the Example
The tests below assume that the psql client has been installed on the test system. If not, the psql client has been previously installed, it can be installed as follows:
```
sudo yum -y install postgresql
```
In addition, the tests below assume that the tested environment DNS resolves to the Kube DNS and that the tested environment DNS search path is specified to match the applicable Kube namespace and domain. The master service is named pgset-master and the replica service is named pgset-replica.
Test the master as follows (the password is password):
```
psql -h pgset-master -U postgres postgres -c 'table pg\_stat\_replication'
```
If things are working, the command above will return output indicating that a single replica is connecting to the master.
Next, test the replica as follows:
```
psql -h pgset-replica -U postgres postgres -c 'create table foo (id int)'
```
The command above should fail as the replica is **read-only** within a PostgreSQL cluster.
Next, scale up the set as follows:
```
kubectl scale statefulset pgset --replicas=3
```
The command above should successfully create a new replica pod called **pgset-2** as depicted below:
