Skip to content

adavarski/k3d-node-app-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k3s

Local stack using K3D


Simple node app (for playgrounds & LABS)

To run the application, you will need to have:

Usage

# 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

Access Swagger (api)

Browser: http://api.192.168.1.99.nip.io:8080

Screenshot:

#############################

MONITORING (OPTIONAL)

#############################

# 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

About

Simple node app (for playgrounds & LABS)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published