A simple containerized (Docker) and orchestrated (Kubernetes) web application
The project has been created using these technologies:
- Node.js as JavaScript runtime
- Express as web application framework
- Docker as containerization platform
- Kubernetes as container-orchestration system
- kubectl as command-line tool to interact kubernetes
Install:
git clone <repo-url>For acquiring the Docker image either pull the image or build a new image using Dockerfile via type this command:
docker build -t <image-name> .<image-name>.
In order to run the application, you need to create deployment, service, config and secret from yaml files using these commands:
kubectl apply -f nodeapp.config.yaml
kubectl apply -f nodeapp.secret.yaml
kubectl apply -f nodeapp.deployment.yaml
kubectl apply -f nodeapp.service.yamlGetting basic info about kubernetes components:
kubectl get node
kubectl get pod
kubectl get service
kubectl get allOpen a browser and then go to localhost. There will be a beautiful Hello World! text ready for you to see.
To observe console outputs, you need to use this command:
kubectl logs <pod-name>