close

Spring Cloud Kubernetes

1.1.6.RELEASE

Spring Cloud Kubernetes provides implementations of well known Spring Cloud interfaces allowing developers to build and run Spring Cloud applications on Kubernetes. While this project may be useful to you when building a cloud native application, it is also not a requirement in order to deploy a Spring Boot app on Kubernetes. If you are just getting started in your journey to running your Spring Boot app on Kubernetes you can accomplish a lot with nothing more than a basic Spring Boot app and Kubernetes itself. To learn more, you can get started by reading the Spring Boot reference documentation for deploying to Kubernetes and also working through the workshop material Spring and Kubernetes.

Features

  • Kubernetes awareness

  • DiscoveryClient implementation

  • PropertySource objects configured via ConfigMaps

  • Client side loadbalancing via Netflix Ribbon

Getting Started

The easiest way to get started is by including the Spring Cloud BOM and then adding spring-cloud-starter-kubernetes-all to your application’s classpath. If you don’t want to include all of the Spring Cloud Kubernetes features you can add individual starters for the features you would like. By default Spring Cloud Kubernetes will enable the kubernetes profile when it detects it is running inside a Kubernetes cluster. You can take advantage of this by creating a kubernetes-application configuration properties for anything specific to Kubernetes you might want to configure. Once the starter is on the classpath the application should behave as any other Spring Cloud application.

Spring Boot Config

Spring Initializr

Quickstart Your Project

Bootstrap your application with Spring Initializr.

Documentation

Each Spring project has its own; it explains in great details how you can use project features and what you can achieve with them.
1.1.6.RELEASE CURRENT GA Reference Doc. API Doc.
2.0.0-SNAPSHOT SNAPSHOT Reference Doc. API Doc.
2.0.0-M3 PRE Reference Doc. API Doc.
1.1.7.BUILD-SNAPSHOT SNAPSHOT Reference Doc. API Doc.
1.0.5.RELEASE GA Reference Doc. API Doc.

A few examples to try out: