todo application deploy using docker container and managed with kubernetes.
Source Code of the application joy-software/TODO
To use test the deployment using docker and kubernetes, you have to:
- Install Docker (https://docs.docker.com/install/)
- Install Kubectl (https://kubernetes.io/docs/tasks/tools/install-kubectl/)
- Install an hypervisor
- For OS X, install VirtualBox or VMware Fusion, or HyperKit.
- For Linux, install VirtualBox or KVM.
- Install Minikube (https://github.com/kubernetes/minikube/releases)
- Install docker-compose (https://docs.docker.com/compose/install/)
- Install Kompose (http://kompose.io/)
-
Start minkube
-
Deploy the app
-
Using Docker-compose
- Download the project
- Go to the Root directory
- Exectute the command:
sudo docker-compose up –d
- Two containers must be created, to check that both containers are created, type the command
sudo docker ps
- To view the aplication just connect to (localhost:8000/app)
-
Using kompose
- Download the project
- Go to the directory called "kubernetes"
- Exectute the command:
sudo kompose convert
- Then:
kubectl create –f db-deployment.yaml,db-service.yaml,php-deployment.yaml,php-service.yaml
- Finally:
minikube service php –url
, to get the url from which you could connect to the app
-