Giter Club home page Giter Club logo

gateway's Introduction

gateway

Running in local development environment

mvn spring-boot:run

Packaging and Running in docker environment

mvn package -B -DskipTests
docker build -t username/gateway:v1 .
docker run username/gateway:v1

Push images and running in Kubernetes

docker login 
# in case of docker hub, enter your username and password

docker push username/gateway:v1

Edit the deployment.yaml under the /kubernetes directory:

    spec:
      containers:
        - name: gateway
          image: username/gateway:latest   # change this image name
          ports:
            - containerPort: 8080

Apply the yaml to the Kubernetes:

kubectl apply -f kubernetes/deployment.yaml

See the pod status:

kubectl get pods -l app=gateway

If you have no problem, you can connect to the service by opening a proxy between your local and the kubernetes by using this command:

# new terminal
kubectl port-forward deploy/gateway 8080:8080

# another terminal
http localhost:8080

If you have any problem on running the pod, you can find the reason by hitting this:

kubectl logs -l app=gateway

Following problems may be occurred:

  1. ImgPullBackOff: Kubernetes failed to pull the image with the image name you've specified at the deployment.yaml. Please check your image name and ensure you have pushed the image properly.
  2. CrashLoopBackOff: The spring application is not running properly. If you didn't provide the kafka installation on the kubernetes, the application may crash. Please install kafka firstly:

https://labs.msaez.io/#/courses/cna-full/full-course-cna/ops-utility

gateway's People

Contributors

rock73 avatar acmexii 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.