Databases
Configuring Databases for Utopia in a Kubernetes Environment
Overview of Database Options in Kubernetes:
Utopia utilizes three primary databases: MongoDB, MySQL, and Redis. When deploying Utopia in a Kubernetes cluster, you have the flexibility to choose how these databases are set up:
Databases within the Kubernetes Cluster:
You can configure Kubernetes to automatically set up these databases within your cluster. This is a convenient option that integrates the databases directly into your Kubernetes environment.
External Databases:
Alternatively, you can connect Utopia to external database instances. This is often preferred for large production environments due to advantages like dedicated resources, easier database maintenance, and enhanced data control.
Using the Installation Configurator for Database Setup:
Bring Your Own Database Option:
If you opt for external databases, select the "Bring your own database" option in the configurator.
An input box will appear for you to enter your database connection details (e.g., connection strings). An example format is provided as a guide.
Note: When choosing external databases, Helm (the package manager for Kubernetes) will not set up internal databases in the cluster.
Default Kubernetes Database Setup:
If you prefer Kubernetes to handle the database setup, leave the "Bring your own database" option unchecked. Helm will then set up the necessary database instances within your cluster.
Database Passwords:
You have the option to set a custom root password for your databases. If you leave the password field blank, a preset password will be used, which you can find in your
values.yaml
file.
Persistent Volume (PV) Configuration:
The Persistent Volume storage is crucial for maintaining database data persistently across pod restarts and failures in Kubernetes.
Two important inputs in the configurator relate to your chosen PV storage provider. Each cloud provider or volume supplier has different options and performance characteristics. If you would like some options to test with please take a look in the Cluster Craft section
To identify available PV types, run
kubectl get sc
in your terminal. This command displays the available Storage Classes in your cluster.Input the appropriate Storage Class in the configurator.
Volume Creation:
Check if your PV provider automatically creates a volume when you create a Persistent Volume Claim (PVC). In most cases, a PV is automatically created with a PVC.
If your provider does not automatically create a PV, make sure to check the "Install Volume" option in the configurator.
Finalizing Your Database Configuration:
After setting up your database preferences and specifying the necessary storage and connection details, you'll have tailored the database component of your Utopia Kubernetes installation to your specific needs and environment.
Last updated