Hi there! Welcome to this step-by-step guide on deploying a Database Management Application using Percona Everest on Google Kubernetes Engine (GKE).
What is Percona Everest?
Percona Everest is an open-source, cloud-native database platform designed for automated database provisioning and management. In simpler terms, Percona Everest simplifies and automates the entire lifecycle of databases in cloud environments using Kubernetes.
Setting Up the Environment
Before to start, ensure you have gcloud and kubectl installed. If you haven't done this yet, you can install them with the following commands:
gcloud auth login
gcloud components install kubectl
With these tools ready, we can proceed to create a Kubernetes cluster on GKE.
Creating the Kubernetes Cluster
To create a Kubernetes cluster, use the following command:
gcloud container clusters create percona-everest-cluster --zone europe-west2-a --cluster-version 1.27 --machine-type n1-standard-4 --num-nodes=1
That command will create a cluster with:
- Name:
percona-everest-cluster
- Zone:
europe-west2-a
- Kubernetes version
1.27
- Machine type:
n1-standard-4
- Number of Nodes: 01 node
The cluster creation will take a few minutes.
Once the process is complete, you should see a status of "RUNNING" indicating that your cluster is healthy and operational.
Setting Up Cluster Role Binding
Next, let's set up a ClusterRoleBinding to manage permissions for your Google Cloud user. This will give the currently logged-in user all necessary permissions over the cluster.
kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user $(gcloud config get-value core/account)
Now that the cluster is set up, it's time to install Percona Everest.
Installing Percona Everest
First, verify that your Kubernetes cluster is up and running by checking the nodes:
kubectl get nodes
Now, let's download and install the Everest CLI, the command-line tool to interact with and manage Percona Everest.
For macOS users:
curl -sSL -o everestctl https://github.com/percona/everest/releases/latest/download/everestctl-darwin-arm64
chmod +x everestctl
Check how to do it in other Operating Systems in Install Everest CLI
Next, install Percona Everest:
./everestctl install
During installation, you'll be asked to provide a namespace for Everest. If no name is provided, it will default to everest
.
Afterward, you will choose which operator to install (MySQL, MongoDB, or PostgreSQL). For this demo, I will install all of them.
The installation includes several steps, let’s review these steps:
- Install the Operator Lifecycle Manager (OLM), which automates lifecycle management for Kubernetes database operators.
- Integrate Percona’s operator catalog into your Kubernetes environment, giving access to Percona's database solutions.
- Set up a dedicated space for monitoring tools.
- Deploy the VictoriaMetrics operator to manage monitoring and metrics collection for your databases.
- Configure and deploy the necessary tools for monitoring the health and performance of your databases.
- Creates a namespace specifically for the Percona Everest environment
- Deploy the required database operators (Percona XtraDB Cluster, Percona Server for MongoDB, and PostgreSQL) within the “Everest” namespace.
- Set up Role-Based Access Control to manage permissions.
- Installs the core Everest operator, which automates the provisioning and management of databases within the Kubernetes cluster.
- Deploy the API server for Everest, enabling communication between different components and allowing external systems to interact with Everest.
Setting the Admin Password
Once the installation is complete, update the password for the admin user with this command:
everestctl accounts set-password --username admin
Alternatively, you can retrieve the initial admin password using:
everestctl accounts initial-admin-password
Remember, it's best to set your own password, as the generated one isn't stored securely.
Accessing the Percona Everest UI
To access the Everest UI, you can use kubectl port-forwarding:
kubectl port-forward svc/everest 8080:8080 -n everest-system
Now, open your browser and navigate to localhost:8080
. The default username is admin
, and you can paste the password generated earlier.
Once logged in, you can start creating your databases, create backups and restores, and monitor them.
Explore More Features
Percona Everest has many advanced features, such as:
- Multi-cloud deployments
- Support for multiple open-source databases
- Horizontal and vertical scaling
- Disaster recovery capabilities
- Resource allocation flexibility
- Database monitoring with Percona Monitoring and Management (PMM)
The official Percona Everest documentation provides more detailed information about these features. If you'd like to see more demos, check out the list of videos available on our YouTube Channel.
That's it! I hope you found this guide helpful.
Thanks for reading, and have a nice day!