Database
Set up a database easily and securely with Kapstan. This guide walks you through the steps for configuring your own database instance in a Kapstan managed environment.
Before you proceed, ensure you have a virtual network set up in your environment. If not, please follow the steps to setup Virtual Network.
Steps to Create a Database
- Navigate to the Infrastructure Overview on the Kapstan.
- Click on "Create" and then on "Database".
- Alternatively, you can also click here to create a new database. It will create a new database in your selected environment.
Configuration
Complete the creation process by providing the required values in the form.
- Database Name: Enter a unique name for your database.
- Virtual Network: Choose the appropriate Virtual Network in which your database will reside. This must be set up beforehand. More details here.
- Database: Specify the database. You can choose between MySQL and Postgres.
- Instance: Decide on the type of instance for your database. This determines the compute and memory capacity of your database.
The setup process typically completes within just a few minutes. To monitor the status of your Database, please visit the Infrastructure Overview page. Read about Infrastructure Overview here.
Behind the Scenes
When you create a database through Kapstan, the platform automatically configures essential settings such as security groups, parameter groups, and logging features to make your database operational and secure.
Connecting to database
Using Kapstan CLI
- Install Kapstan CLI, if not already installed. Learn more.
- Authenticate CLI via following command:
kapstan login
- Connect to the database
kapstan connect service -o="<organization-name>" -e="environment-name" -s="<service-name>"
Using Tailscale
If you are using Tailscale in your cluster/cloud provider via Kapstan, then you can take the following steps to connect tot database.
- Install Tailscale app via Tailscale download page and authenticate.
- Once authenticated, fetch the IP address or the machine-name of the database. You can look at this link to know more on how to connect to devices.
- Once you have the IP address or machine-name, you can connect to the database using the above IP address/machine-name as host and using the username/password provided at the time of creation of the database.