-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial kubernetes configuration files
- Loading branch information
1 parent
8d68c3f
commit 33356d8
Showing
3 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: backend | ||
namespace: secure-auth | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: backend | ||
template: | ||
metadata: | ||
labels: | ||
app: backend | ||
spec: | ||
containers: | ||
- name: backend | ||
image: sberston/backend:latest | ||
ports: | ||
- containerPort: 3000 | ||
env: | ||
- name: PORT | ||
value: "3000" | ||
- name: DB_HOST | ||
value: "host.docker.internal" # Note: You might need to adjust this for k8s | ||
- name: SESSION_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: backend-secrets | ||
key: SESSION_SECRET | ||
- name: JWT_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: backend-secrets | ||
key: JWT_SECRET | ||
livenessProbe: | ||
httpGet: | ||
path: /health | ||
port: 3000 | ||
initialDelaySeconds: 30 | ||
periodSeconds: 30 | ||
timeoutSeconds: 5 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: backend | ||
namespace: secure-auth | ||
spec: | ||
selector: | ||
app: backend | ||
ports: | ||
- port: 3000 | ||
targetPort: 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: frontend | ||
namespace: secure-auth | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: frontend | ||
template: | ||
metadata: | ||
labels: | ||
app: frontend | ||
spec: | ||
containers: | ||
- name: frontend | ||
image: sberston/frontend:latest | ||
ports: | ||
- containerPort: 80 | ||
env: | ||
- name: BACKEND_URL | ||
value: "http://backend:3000" | ||
livenessProbe: | ||
httpGet: | ||
path: /health | ||
port: 80 | ||
initialDelaySeconds: 30 | ||
periodSeconds: 30 | ||
timeoutSeconds: 5 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: frontend | ||
namespace: secure-auth | ||
spec: | ||
selector: | ||
app: frontend | ||
ports: | ||
- port: 80 | ||
targetPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: secure-auth-ingress | ||
namespace: secure-auth | ||
spec: | ||
rules: | ||
- host: your-domain.com # Replace with your domain | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: frontend | ||
port: | ||
number: 80 |