Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 996 Bytes

README.md

File metadata and controls

42 lines (34 loc) · 996 Bytes

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