Change the logging level using ConfigMap

ConfigMap
apiVersion: v1
kind: ConfigMap
metadata:
name: configuration
namespace: default
data:
log_level: info
$ kubectl apply -f configmap.yaml
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
containers:
- name: app
env:
- name: LOG_LEVEL
valueFrom:
configMapKeyRef:
name: configuration
key: log_level
Logging using ConfigMap
JAVA_OPTS -e "-Dlogging.config=<path for logback>\logback-spring.xml"Run your application and change path accordingly in configMap for Env Variable of JAVA_OPTS

<configuration debug=”true” scan=”true” scanPeriod=”10 seconds”>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store