Externalize Application Configuration With Spring Cloud Config

Introduction

One of the principles from the 12 Factor App, states that we have to separate our application configuration from the code. The configuration varies based on the environment and it's better to organize them based on the environment your application is running. 

So in this article, we will be looking at how we can externalize configurations with Spring Cloud Config.

Spring Cloud Config Server on Kubernetes (Part 2)

This is the second of a two part article about building centralised configuration with Spring Cloud Config Server. In this post we’ll take the the two Spring Boot services created in part one and run them on Kubernetes.

We’ll initially deploy to a local cluster before stepping things up and deploying to Azures manged Kubernetes Service, AKS. By the end of this post you should have two Spring Boot services deployed to an AKS cluster as shown in the diagram below.

Spring Cloud Config Server on Kubernetes (Part 1)

This is the first of a two part article where I’ll show you how to use Spring Cloud Config Server to build centralised configuration for your microservices. In this first post we’ll create a Config Service that pulls its data from a Git repo and exposes it to other services. We’ll also create a consumer, a Config Consumer Service that pulls from the Config Service on startup. The diagram below shows how the services will interact.

In part two of this article we’ll take the two services and deploy them to Kubernetes. We’ll initially deploy and test on a local Kubernetes cluster, before deploying on Azures manged Kubernetes Service, AKS.

Configuration As A Service: Spring Cloud Config – Using Kotlin

Developing a microservice architecture with Java and Spring Boot is quite popular these days. In microservice architecture we hundreds of services and managing services for each service and for each profile which is a quite tedious task. In this article, we will demonstrate the Spring cloud config server using Kotlin. 

Spring Boot provided a much-needed spark to the Spring projects.

Microservices Architectures: Centralized Configuration and Config Server

In this article, we explore the concept of centralized configuration in the context of microservices.

You Will Learn

  • What a cloud config server is.
  • What centralized configuration is.
  • Why we need centralized configuration in a microservices architecture.
  • What the important features of Spring Cloud Config Server are.

Cloud and Microservices Terminology

This is the second article in a series of six articles on terminology used with cloud and microservices. Part 1 is available here:

Microservice Configuration: Spring Cloud Config Server Tutorial

Configuring Microservices: The Challenges

Managing application configuration in a traditional monolith is pretty straight forward. The configuration is usually externalized in a properties files on the same server as the application. If you need to update the configuration you simply amend the properties file and restart the application. Things can get a little tricker with microservices, but why is that? 

Microservices are composed of many small, autonomous services, each with their own configuration. Rather than a centralised properties file (like the monolith), configuration is scattered across multiple services, running on multiple servers. In a production environment, where you likely have multiple instances of each service, configuration management can become a hefty task.