![]() Create Secretsĭevelopers can start by creating a Kubernetes Secret called spring-security. Let’s now follow the next steps to inject the environment variables. To override the default security user/password, you need to update the application.properties to be: =$ The default user and password of the application will be displayed to the developer during application boot up. Spring Security, by default, enables security on the entire Spring Boot application. The Spring Boot application that we will build in this blog post uses spring-security. ![]() Like ConfigMaps, Secrets can be configured in two ways: The easiest way to get a local Kubernetes cluster up and running is using minikube.The rest of this post assumes you have minikube up and running. You might need access to a Kubernetes cluster to play with this application. The sources for this blog post are available in my GitHub repo. In this second part of the series, we will explore configuring Spring Boot on Kubernetes with Secrets. When using sensitive data like API keys, passwords, etc., Secrets are the preferred and recommended way. ConfigMaps are OK when we use simple configuration data that does not contain sensitive information. In Part 1 of this series, we saw how to use ConfigMaps to configure a Spring Boot app on Kubernetes.
0 Comments
Leave a Reply. |