I have successfully deployed a pod and service for a Spring-Boot-API to AWS-Kubernetes-Cluster (EKS).
The App connects to a MySQL RDS. RDS and EKS are in different VPCs. I configured a Peering connection and also the routes in the VPCs.
The database is public and I can connect from my local environment.
For the cluster, I configured the environment variables in the deployment-YAML and injected them with config-map (secrets for user and pwd)
When the pod starts I get the following error:
java.sql.SQLException: Access denied for user 'admin'@'172.31.35.70' (using password: YES)
I guess that this is a network issue, as the username is resolved correctly!