Giter Site home page Giter Site logo

microservices-with-node-js-and-react's Introduction

microservices-with-node-js-and-react

https://www.udemy.com/course/microservices-with-node-js-and-react/

Install minikube ubuntu

sudo apt install minikube

Install skaffold

https://skaffold.dev/docs/install/#standalone-binary

Common Docker commands

docker build -t tag_name[:version] .            # Build an image based on the dockerfile in the current directory. Tag it as 'fgscaglioni/posts'. When version is not provided than the version is latest.
docker run [image_id or image_tag]              # Create and start a container base on provided image id or tag
docker run -it [image_id or image_tag] [cmd]    # Create and start container, but also override the default command
docker ps                                       # Print out information about all of the running containers
docker exec -it [container_id] [cmd]            # Execute the given command in a running container
docker logs [container_id]                      # Print out logs from the given container

Kubernetes

Error executing kubectl

Important Kubernetes terminology

  • Kubernetes cluster - A collection of nodes + a master to manage them
  • Node - A virtual machine that will run our containers
  • Pod - More or less a running container. Technically, a pod can run multiple containers (we won't do this)
  • Deployment - Monitors a set of pods, make sure they are running and restarts them if they crash
  • Service - Provides an easy-to-remember URL to access a running container

Common commands around deployments

kubectl get deployments                             # List all running deployments
kubectl get pods                                    # List all pods
kubectl get services                                # List all services
kubectl delete pod posts-depl-7ff956544b-2scsg      # Delete some pod
kubectl describe deployment depl_name               # Print out details about a specific deployment
kubectl describe service service_name               # Print out details about a specific deployment
kubectl apply -f config_file_name                   # Create a deployment out of a config file. kubectl apply -f infra/k8s/posts-depl.yaml
kubectl delete deployment depl_name                 # Delete a deployment
kubectl rollout restart deployment depl_name
kubectl logs pod_name                               # Print out logs from pod

Running the project

# ./install.sh
# ./docker-build-images.sh
# kubectl delete -f ./infra/k8s/
# kubectl apply -f ./infra/k8s/
# minikube ip
# kubectl get services
# kubectl get pods
# kubectl rollout restart deployment
skaffold dev

Important - DO NOT SKIP - Ingress Nginx installation info

Installation - Minikube (Linux)

minikube addons enable ingress

microservices-with-node-js-and-react's People

Contributors

fgscaglioni avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.