Git Product home page Git Product logo

bp-project's Introduction

Brasil Paralelo Project

This project creates a local Kubernetes cluster using Kind and deploy two applications, authentication and feed.

Pre-requisites

Also, ensure the port 80 is not in use by any other service in your system. It will be used by the Ingress to expose the application.

Run

Execute the helper script to create the cluster and deploy the Kubernetes resources for auth and feed applications (Deployment, Service, Ingress, HorizontalPodAutoscaler, PodDisruptionBudget, Ambassor Ingress Controller):

./kubernetes/setup.sh

Test the application:

curl -H "Authorization: Bearer 66ec51ac-72ea-479d-8b5f-d99eede929f0" -v localhost/feed/patriota # 200 OK

curl -H "Authorization: Bearer 66ec51ac-72ea-479d-8b5f-d99eede929f0" -v localhost/feed/premium # 403 Forbidden

curl -H "Authorization: Bearer 2974ef88-cd63-4418-95cd-106c616fd08f" -v localhost/feed/patriota # 200 OK

curl -H "Authorization: Bearer 2974ef88-cd63-4418-95cd-106c616fd08f" -v localhost/feed/premium # 200 OK

INFO: The Ingress controller could take some minutes to be ready, so the application could take a while to respond to the curl requests

The cluster and its resources could be completelly removed by running:

/tmp/kind delete cluster # use the proper path to the kind binary if installed in a different directory

Other

There is a Helm chart in the repository as reference. As a personal choice, the raw Kuerbenetes resources are deployed rather than the Helm chart, but it could be deployed using Helm3 as well.

helm install --name auth --namespace app kubernetes/helm -f kubernetes/helm/deployments/auth.yaml

helm install --name feed --namespace app kubernetes/helm -f kubernetes/helm/deployments/feed.yaml

bp-project's People

Contributors

mpalu avatar dependabot[bot] 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.