To run the application, you will need to have:
# Build image
$ cd app && docker build -t davarski/api-produto:v1.0.0 .
# Push image
$ docker davarski/api-produto:v1.0.0
# Create cluster using k3d
$ k3d cluster create --servers 1 --agents 2 -p "8080:30000@loadbalancer" -p "8181:30001@loadbalancer" -p "8282:30002@loadbalancer"
# Apply kubernetes manifests for node app
$ kubectl apply -f ./kubernetes/
# Create ingress for api (Swagger)
$ kubectl apply -f ingresses/api-swagger.png
Browser: http://api.192.168.1.99.nip.io:8080
Screenshot:
#############################
#############################
# Add repo helm prometheus
$ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
$ helm repo update
# Install prometheus on cluster
$ helm install prometheus prometheus-community/prometheus --values ./prometheus/values.yaml
# Dashboard grafana
$ localhost:8181
# Add repo helm grafana
$ helm repo add grafana https://grafana.github.io/helm-charts
$ helm repo update
# Install grafana on cluster
$ helm install grafana grafana/grafana --values ./grafana/values.yaml
# Dashboard grafana
$ localhost:8282