Create and manage instance groups
Create PostgreSQL instance group
A PostgreSQL instance group is an object that manages the lifecycle of instances and backups. It includes various statuses such as operational and terminated, which users can monitor and manage.
To create an instance group in the PostgreSQL service, follow these steps:
- If the creation of an instance group fails due to unexpected reasons such as network errors or resource shortages, you can check the details in the Cloud Trail service.
- Even if you expand the volume after creating an instance group, the maximum IOPS remains fixed at the initially specified value. Set an appropriate volume size for stable performance.
-
Navigate to the KakaoCloud Console > Data Store > PostgreSQL menu.
-
Click the Create instance group button.
-
Enter the required information and click the [Create] button.
Item Category Description Basic settings Instance group name Name of the PostgreSQL instance group
- Must be unique within the same project
- Example: PostgreSQL-instance-01Description (optional) Additional description for the instance group (up to 100 characters) Instance availability High availability Create a primary instance and multiple standby instances
- Single AZ or Multi-AZSingle Create only a single primary instance
- Single AZ onlyPostgreSQL settings Engine version Automatically selects the PostgreSQL database version
- Version14.14
is availablePrimary port Port for communication with the PostgreSQL primary instance, configurable between 1024–65535 (default: 5432
)Standby port Port for communication with the PostgreSQL standby instance, required if high availability is selected (default: 5433
)ID User account ID for the PostgreSQL database
- Example: admin
* Reserved account names (root, postgres, replication, etc.) cannot be usedPassword Initial password for the user account
- Format: 8–16 characters, without spaces or special characters like/
,'
,"
,@
Instance type Choose the instance type to configure database computing resources.
- See Instance types for detailsDefault storage SSD Configure the volume type and size for the database.
- Current support: SSD only
- Size: 100 GB–16,384 GBLog storage SSD Configure the storage for database logs.
- Current support: SSD only
- Size: 100 GB–16,384 GBNetwork settings Multi-AZ options Specify subnets and the number of instances to create in each AZ for high availability. VPC Select the network where the PostgreSQL database will be deployed. Subnet and instance count Specify the subnets for primary and standby instances and the number of instances.
- Maximum 6 instances per group.
- At least two instances recommended for redundancy.Security group Create a new security group or select an existing one for the instance group.
For more details about instance groups, see Instance groups.
User accounts in instance groups
When creating a PostgreSQL instance group, you can configure a user account with a specified ID and password.
This account will have Admin
privileges, granting access to resources upon authentication.
- User accounts cannot be created with IDs reserved for administrative purposes (
root
,postgres
,replication
,rewind
,orafce_set_umask
,plprofiler
). - Deleting a replication account may cause high availability mode to malfunction.
Role | Privileges |
---|---|
User account | Create role, Create DB, Bypass RLS, Password valid until infinity |
Connect PostgreSQL instance group
To connect instances to a PostgreSQL instance group, use the following steps.
After creating the instance group and configuring the instances, use a PostgreSQL Client to connect the instances to the PostgreSQL instance group.
If the primary instance changes due to automatic or manual failover or a restart, internal connection information will be updated, possibly causing brief disruptions.
Prerequisites
Ensure that the virtual machine (VM) instance uses the same network as the PostgreSQL instance group and has access to its endpoint.
Grant access to user-defined ports (1024–65535) or PostgreSQL default ports (5432
for Primary, 5433
for Standby) in the security group.
Connect instances
-
Prepare a virtual machine with a PostgreSQL Client installed.
Refer to Create and connect VM instance for setup instructions. -
Navigate to the KakaoCloud Console > Data Store > PostgreSQL menu.
-
Select the PostgreSQL instance group to connect from the Instance Group menu.
-
In the Details tab, retrieve the Endpoint and user account ID. Copy this information for use in PostgreSQL commands.
-
Execute the PostgreSQL connection command on the VM to connect the instance to the PostgreSQL instance group.
Connection method 1$ PGPASSWORD={USER_PASSWORD} psql -h {ENDPOINT} -U {USER_ID} -d {DATABASE} -p {PORT}
PostgreSQL instance connection method 2$ psql postgres://{USER_ID}:{USER_PASSWORD}@{ENDPOINT}:{PORT}/{DATABASE}
Item Description {USER_ID}
Database user ID
- Administrator account ID used to connect to the PostgreSQL instance.{USER_PASSWORD}
Password for the administrator account connecting to the PostgreSQL instance.
- Set during PostgreSQL creation.{ENDPOINT}
Endpoint information obtained from the Details tab.
- The endpoint of the PostgreSQL instance.{DATABASE}
Name of the database to connect to.
- Default:postgres
for KakaoCloud PostgreSQL.
- For custom databases, input the specific database name.{PORT}
Port number specified during instance group creation.
- Default values: Primary5432
, Standby5433
.
Manage instance groups
The following explains how to manage running instances and instance groups in the PostgreSQL service.
View PostgreSQL instance group list
You can check the list of currently running PostgreSQL instance groups.
-
Navigate to the KakaoCloud Console > Data Store > PostgreSQL menu.
-
View the list of instance groups in the Instance Group menu.
Field Description Instance group name Name of the PostgreSQL instance group entered during creation.
- Click to view detailed information.Status Current status of the PostgreSQL instance group.
- See Instance groups for details.Engine version PostgreSQL database version selected during creation. Instance type Instance type selected during creation. Availability Availability option selected during creation. Multi AZ Indicates whether Multi-AZ is enabled. Created at Creation date and time of the PostgreSQL instance group. Creator User who initially created the PostgreSQL instance. [More] icon Expand volume: Expand volumes (base, log storage).
Delete: Release resources and delete backups.
Manual failover: Perform failover for high availability.
Create backup: Create a backup for the instance group.
View PostgreSQL instance group details
You can view detailed information about a PostgreSQL instance group.
- Navigate to the Data Store > PostgreSQL menu in the KakaoCloud Console.
- Select the PostgreSQL instance group from the Instance Group menu to view details.
- Review the detailed information about the selected PostgreSQL instance group.
Expand PostgreSQL instance group volumes
Expand the volumes for PostgreSQL instance groups. Both base and log storage can be expanded to a maximum of 16 TB (16,384 GB).
Volume expansion increases disk capacity but does not increase maximum IOPS. IOPS scaling will be supported in future updates.
- Navigate to the Data Store > PostgreSQL menu in the KakaoCloud Console.
- Select the [More] icon > Expand volume for the desired instance group.
- Enter the size for the base and log storage to be expanded and click the [OK] button.
Delete PostgreSQL instance groups
You can delete PostgreSQL instance groups that are no longer needed.
When deleting a PostgreSQL instance group, all instances are stopped, and the resources are fully released. Deleted instance groups will not incur further charges.
Deleted instance group resources and backups are permanently released and cannot be recovered.
- Navigate to the Data Store > PostgreSQL menu in the KakaoCloud Console.
- Select the [More] icon > Delete for the PostgreSQL instance group to be deleted.
- Enter the required details in the popup and click the [Delete] button.