Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 0 additions & 73 deletions gobank-api-deployment.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion k3d-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ servers: 1
agents: 2
image: rancher/k3s:v1.36.0-rc3-k3s1
kubeAPI:
hostIP: "0.0.0.0"
hostIP: "127.0.0.1"
hostPort: "6550"
ports:
- port: 80:80
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,36 +56,4 @@ spec:
name: db-creds
key: username
- name: DB_SOURCE
value: "postgres://gobank-db-rw:5432/gobank?sslmode=disable"
---
# The Service (The Internal Load Balancer)
apiVersion: v1
kind: Service
metadata:
name: gobank-api-service
spec:
selector:
app: gobank-api
ports:
- protocol: TCP
port: 80
targetPort: 8080
---
# The Ingress (The External Load Balancer)
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gobank-ingress
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: gobank-api-service
port:
number: 80
value: "postgres://gobank-db-rw:5432/gobank?sslmode=disable"
17 changes: 17 additions & 0 deletions k8s/apps/gobank/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gobank-ingress
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: gobank-api-service
port:
number: 80
4 changes: 3 additions & 1 deletion k8s/apps/gobank/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ namespace: gobank
resources:
- namespace.yaml
- postgres-cluster.yaml
- gobank-api-deployment.yaml
- gobank-api-deployment.yaml
- service.yaml
- ingress.yaml
11 changes: 11 additions & 0 deletions k8s/apps/gobank/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: gobank-api-service
spec:
selector:
app: gobank-api
ports:
- protocol: TCP
port: 80
targetPort: 8080
22 changes: 0 additions & 22 deletions postgres-cluster.yaml

This file was deleted.