Before we begin
As you may know , database is one of the key building blocks for a variety of applications. At the moment, most openshift customers run their databases on the same cluster, manage it themselves and provide access to developers.
Database as a service makes this much simpler, allowing databases to run at a central location managed by database administrators allowing business to focus on their applications.But developers often access these database services in different ways,
For example, developer often receives security credentials from their platform teams. These credentials are often shared on-demand where developers end up configuring DBaaS connections manually that can be time-consuming and error-prone. However, it is inefficient and risky to have each team independently connect applications to different DBaaS offerings.
Most often for the platform teams, the proliferation of instances and types of database cloud services makes it difficult for them to get a consolidated view of the consumption by different users
Red Hat Solution
-
More efficient connection, DB utilization
-
Faster and easier self-service for developers
-
Centralized monitoring, consistent control plane for admins
Service binding libraries
-
The Kubernetes service binding feature was introduced to bring consistency to the way secrets are shared for connecting applications to external services, such as REST APIs, databases, and many other services.
-
OpenShift Database Access leverages the service binding feature to bring a low-touch administrative experience to provisioning, and managing access to external database services.
-
The service binding feature enables developers to connect their applications to database services with a consistent, and predictable experience.
-
Specifically, a service binding creates a volume on the application pod, and organizes the information to make a connection to the database in a directory structure.
-
The volume mount point is exposed as an environment variable.
-
Developer frameworks, such as Quarkus, are service binding aware, and can automatically connect to a database using this exposed workload information without needing to embed database connection information in the application source code.
Here are some application examples on how to use a service binding library:
-
See the Kubernetes GitHub project for more details on service bindings.