How to convert a MySQL database and a PHP/JS application into an image that can be deployed in a Kubernetes cluster?

12/25/2018

I have an application prepared in PHP/JS using a MySQL database. Can I convert my application and database into images executable in a Kubernetes cluster?

-- Muhammad Khan
docker
kubernetes
yaml

1 Answer

12/25/2018

Yes. You should be able to convert your application into one docker image and your database into another docker image. Then create a Kubernetes deployment file (YAML) with two services...one being DB and the other being App with the App depending on the DB service.

See this link for a sample (though not in php)

-- sxm1972
Source: StackOverflow