I have a Spring boot application which is configured with https with the below properties.
server.ssl.keyStore=/users/admin/certs/appcert.jks
server.ssl.keyStorePassword=certpwd
server.ssl.trustStore=/users/admin/certs/trustcert
server.ssl.trustStorePassword=trustpwd
These applications were running in VM's and the certs were placed in the defined path. Now, trying to deploy this application into Kubernetes and not sure how to achieve this.
I already have created mount for application.properties in configMap. In my dockerFile,
--spring.config.location=file:/conf/application.properties
and in deployments.yaml like the below one.
"spec": {
"volumes": [
{
"name": "app-prop",
"configMap": {
"name": "app-config",
"items": [
{
"key": "application.properties",
"path": "application.properties"
}
]
}
}
],
"containers": [
{
"name": "app-service",
"image": "docker.com/app-service",
"volumeMounts": [
{
"name": "app-prop",
"mountPath": "/conf"
}
],
"imagePullPolicy": "IfNotPresent"
}
],
The property server.ssl.keyStore is in application.properties.