Quick Start Guide

Introduction

The goal of this quick start guide is to:

  • Provide an overview of the Service Binding Operator.

  • Provide a list of prerequisites to be configured on your Kubernetes cluster.

  • Create a PostgreSQL database service.

  • Deploy the Spring Petclinic application.

  • Connect the application to the database service using Service Binding Operator.

For this quick start, we are using a PostgreSQL database and a simple application using the Spring PetClinic Sample Application enriched by Spring Cloud Bindings library. This will allow you to understand how you can use the Service Binding Operator to simplify the connection between a service, like database and the application.

In this configuration, we leverage the Service Binding Operator, to collect the binding data from the PostgreSQL database and project them into the sample application.

Before you start, refer to the Prerequisites section to make sure you have all the needed components configured on your K8s cluster.

The quick start consists of three main steps:

  1. Creating a PostgreSQL database service.

  2. Deploying the Spring Petclinic application.

  3. Connecting the application to the database service using Service Binding Operator.

Prerequisites

In order to follow the quick start, you will need the following tools installed and configured:

  • Kubernetes cluster

    You can use minikube or kind, locally.

  • kubectl command line tool

  • The database service and application are available in an appropriate namespace, such as the my-petclinic namespace.

    You can create the namespace using the kubectl create namespace my-petclinic command.

  • Service Binding Operator

Getting started with Service Binding

Depending on your requirements you can follow the procedures described in any one of the following scenarios to experience how you can use the Service Binding Operator to simplify the connection between a service such as a database and an application: