Skip to content

Basic PM2 node application containerised through Docker and deployed on Kubernetes

License

Notifications You must be signed in to change notification settings

firecast/pm2-docker-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create kubernetes configMap from file

kubectl create configmap pm2-nginx-config-map --from-file=nginx.conf=nginx/nginx.conf

Check the configMap created

kubectl get configmaps pm2-nginx-config-map -o yaml

Running it locally

minikube start --kubernetes-version v1.10.0
eval $(minikube docker-env)
docker build -t pm2-server server/
kubectl apply -f k8-dev-deployment.yaml
kubectl describe deployment pm2-nginx-server

Changing contexts

kubectl config get-contexts
kubectl config use-context minikube

Deployment

gcloud container clusters get-credentials <CLUSTER_NAME> --zone <ZONE> --project <PROJECT_ID>
kubectl create configmap pm2-nginx-config-map --from-file=nginx.conf=nginx/nginx.conf
kubectl apply -f k8-prod-deployment.yaml
kubectl get ingress pm2-nginx-server-ingress

Local PROD debugging

kubectl proxy
kubectl config view

Open localhost:8001 in the browser. User token from the config view command

About

Basic PM2 node application containerised through Docker and deployed on Kubernetes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published