I was able to solve the problem. Sharing for others.
1. Do I just need changes in application.yaml to make my springboot3 work in SSL?
Yes. Springboot3 offers SSL bundle which can be used.
2. Do I need to convert .crt and .key to any other format? or can Springboot3 work with that fine?
Not required. In Springboot3, you can directly consume .crt and .key files
3. How can I fix my errors? I understand that it is related to SSL configuration. I tried this org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop' and Failed to start 'webServerStartStop' spring boot app and it didnt help. And fyi - I am trying to consume the.crt and .key during run time as they reside inside my container in eks cluster which I read during app start up.
you just need below changes in your application.yml file and can consume .crt and .key directly from your local or from your container. In my case, I added the port as 8443 in my application yaml but my app was exposed in 8083. I fixed that too.
server:
port: 8083
ssl:
enabled: true
bundle: mybundle
enabled-protocols: TLSv1.3
spring:
ssl:
bundle:
pem:
mybundle:
keystore:
certificate: /path/to/cert.crt
private-key: /path/to/cert.key
jks:
client:
trust-store:
location: classpath:trust.jks
password: <truststore password>
type: jks