-
Notifications
You must be signed in to change notification settings - Fork 1
Development workflow
Christian Hochlin edited this page Feb 18, 2019
·
14 revisions
All commands are run from the root of the repository. For explanations of the various commands used in the workflow, see Workflow Explanations
Make sure your volume is correctly mounted. On Windows you will most likely need to check out Issues with volume mounting after every restart.
When Docker and Kubernetes starts, it should be up and running. If the volume mounting crashed (check using kubectl get pods and look for failed statuses), run kubectl delete pods --all and Kubernetes will recreate and restart all pods.
You should be able to access the services on http://localhost:30010 (or the port specified in values.dev.yaml under ingress.nodePort).
- Make your changes
kubectl delete pod -l app=<servicename>
- Make your changes
docker build <path-to-dockerfile> -t microservices/<servicename>helm upgrade --install develop -f Infrastructure/kubernetes/charts/default/values.dev.yaml -f Infrastructure/kubernetes/charts/default/local.yaml ./Infrastructure/kubernetes/charts/default/
- Make your changes
- App will hot reload
- Make your changes
docker build <path-to-dockerfile> -t microservices/<servicename>helm upgrade --install develop -f Infrastructure/kubernetes/charts/default/values.dev.yaml -f Infrastructure/kubernetes/charts/default/local.yaml ./Infrastructure/kubernetes/charts/default/
- Add the new service
docker build <path-to-dockerfile> -t microservices/<servicename>helm upgrade --install develop -f Infrastructure/kubernetes/charts/default/values.dev.yaml -f Infrastructure/kubernetes/charts/default/local.yaml ./Infrastructure/kubernetes/charts/default/
- Run
kubectl proxyin a new terminal - Visit
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
if this doesn't work, the dashboard is not deployed.
To deploy the dashboard we need to:
- Deploy the dashboard:
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended/kubernetes-dashboard.yaml - Create user to access the dashboard:
kubectl create -f https://gist.githubusercontent.com/Arthyon/5163b64c12bb64fefe0768ee8f3751cf/raw/278fa1df759bc7bca508f85387bd31dc13c51fb8/k8s-admin-user - Get the token used to log in:
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')