- Build an image for Event Bus (For all Microservices)
- Push the image to Docker Hub (You must be logging in docker)
- Create a deployment for Event Bus (For all Microservices)
- Create a Cluster IP service for Event Bus (For all Microservices)
Add/Update docker container and push it to docker hub. (Login to docker application):
cd auth
docker build -t dellirom/auth .
docker push dellirom/auth
(Add others services to docker hum, as example above)
Get all deployments in our cluster. Find in result necessary [deployment_name]:
kubectl get deployments
Restart deployment, that was updated, by [deployment_name]
kubectl rollout restart deployment [deployment_name]
Install ingress-nginx: [https://kubernetes.github.io/ingress-nginx/deploy/#quick-start]
Course link: [https://www.udemy.com/course/microservices-with-node-js-and-react/learn/lecture/26492690#overview]
Config for ingress-nginx:
k8s/ingress-srv.yaml
Open hosts config file
open /etc/hosts
Add to config file
127.0.0.1 ticketing.local
Official site: [https://skaffold.dev/]
In terminal go to microservice directory cd ticketing
and then run
skaffold dev
or
skaffold run
Open zch config file
open ~/.zshrc
Add alias to config file
alias k="kubectl"
kubectl delete -f infra/k8s/
kubectl get pods
kubectl get deployments
kubectl describe pod [pod_name]
kubectl describe deployment [deployment_name]
kubectl delete pod [pod_name]
kubectl delete deployment [deployment_name]
kubectl delete --all pods [--namespace=foo]
kubectl logs [pod_name]
kubectl logs [deployment_name]
kubectl exec -it [pod_name] [cmd]
kubectl logs [pod_name]
kubectl apply -f [config_file_name]
kubectl rollout restart deployment [deployment_name]
kubectl port-forwatd [pod_name ]
open ~/.zshrc
kubectl create secret generic jwt-secret --from-literal=JWT_KEY=fasdklskohs
kubectl get secrets
kubectl exec -it [POD NAME] sh
npm publish --access public
npm adduser
or npm login
(First need commit changes to git repository)
npm version patch
npm publish
https://dashboard.stripe.com/test/payments