I am trying to run the StudentCoursesRestAPI application in AWS EKS with mysql:5.6 as the database in the backend. I've already created an image of a StudentCoursesRestAPI Application and mysql database and placed it in AWS ECR. I’ve deployed the student application which works but can’t connect to the database through the application even though I have passed the mysql service name as environmental variable in to the student application. It does work with docker on single machine where I was able to pass the ip address of mysql database with docker container run command but doesn't work with K8s. Any idea what could be the problem? Should just passing the service name pass the ip address of the mysql database?
Hi
I am trying to run the StudentCoursesRestAPI application in AWS EKS with mysql:5.6 as the database in the backend. I've already created an image of a StudentCoursesRestAPI Application and mysql database and placed it in AWS ECR. I’ve deployed the student application which works but can’t connect to the database through the application even though I have passed the mysql service name as environmental variable in to the student application. It does work with docker on single machine where I was able to pass the ip address of mysql database with docker container run command but doesn't work with K8s. Any idea what could be the problem? Should just passing the service name pass the ip address of the mysql database?