According to CNCF surveys, security is always among the top concerns for Kubernetes practitioners and platform engineers. Percona Everest — an open source cloud-native database platform –  is now in Alpha stage, but it is important to set it up properly from day 0. In this blog post, we will explain how to run Everest UI in Kubernetes behind ingress and valid SSL certificate.

The design

The Percona Everest frontend is a web-based application. The regular design is to have ingress as a single point of entry, where certificates are provided by cert-manager and Let’s Encrypt.

You can find the manifests that were used in this blog post in the GitHub repository blog-data/everest-ingress-ssl.

Prerequisites

  1. Kubernetes cluster
  2. Percona Everest is up and running
  3. Ingress Controller

– I will deliberately use an open-source ingress-nginx controller to demonstrate the generic case.

– Most cloud providers already have their own ingress solutions in place, so you can just use them instead. Please consult with the corresponding documentation, but I do not expect drastic differences in the manifests. It should just work.

– Domain name to have a proper certificate and to point it to Percona Everest instance.

Action

Install Percona Everest

Before exposing Everest, we need to have it up and running. A quick way here would be to download the CLI tool everestctl and install Everest with it.

Find how to download everestctl in our documentation. For example, for MacOS with an ARM chip, do the following:

Now install Pecona Everest:

Ingress

Start with deploying an ingress-nginx controller. Helm is most probably the easiest way:

This will deploy nginx-ingress controller and expose it with a LoadBalancer service. If your Kubernetes cluster does not support load balancers, then please read through the ingress controller documentation on how to customize the deployment.

To verify that the ingress controller works as expected, we will create an ingress resource pointing to Everest and exposing it on port 80, no TLS for now. By default, Percona Everest is deployed in the percona-everest namespace and exposed through a ClusterIP service everest on port 8080.

01-ingress.yaml will create an ingress resource. Check if it is there and get the public IP-address:

Now if you point your domain name to the ADDRESS, you should be able to open it in your browser. In my case, it is http://everest.percona.com; it is also set in the rules section:

Secure

Let’s Encrypt is the easiest way to get a free TLS certificate. To get it, we will use cert-manager. Install it by following the documentation.

Staging issuer

Let’s Encrypt API has a strict rate-limit. It is strongly recommended to try to get a staging certificate first.

Create an Issuer for Let’s Encrypt staging:

Reconfigure ingress with TLS

It might take a couple of minutes for the certificate to be provisioned. Verify it by trying to connect to https endpoint of your domain for Everest:

Production issuer

Now that everything is working with the Let’s Encrypt staging server, we can switch to the production server and get a trusted SSL certificate for your domain.

Create production Issuer:

Upgrade ingress controller to use production Issuer:

After a few moments, the certificate will be updated. Now you can connect to your Percona Everest instance through HTTPs.

Percona Everest

Troubleshooting

The issue that I faced, and it seems to be quite common (1, 2), is not getting the certificate applied and seeing the following error in cert-manager logs:

It depends on how routing is configured in your cluster and if cert-manager request leaves the Kubernetes cluster. The simplest fix here is to add acme.cert-manager.io/http01-edit-in-place annotation to your ingress objects.

Read more about this annotation in cert-manager documentation.

Conclusion

In conclusion, Percona Everest represents a significant advancement in cloud-native database solutions, offering a robust, scalable, and secure platform for managing databases in Kubernetes environments. By leveraging the power of Percona Everest, organizations can enjoy the benefits of an open-source database platform designed to meet the demands of modern applications, with the added advantages of cloud-native technologies for enhanced performance, flexibility, and reliability.

We encourage you to take the first step towards a more secure and efficient database management experience by trying out Percona Everest. Visit our documentation to get started, and join our community to share your experiences and learn from others. Embrace the future of database management with Percona Everest, and take your applications to new heights with confidence.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments