Add k8s configuration
This commit is contained in:
parent
57c62f9f98
commit
4450d63964
52
deploy.yaml
Normal file
52
deploy.yaml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mathy
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
name: mathy
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: mathy
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mathy
|
||||||
|
image: glmdev/mathy:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mathy-service
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 80
|
||||||
|
selector:
|
||||||
|
name: mathy
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: mathy-ingress
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: "mathy.glmdev.tech"
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- pathType: Prefix
|
||||||
|
path: "/"
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: mathy-service
|
||||||
|
port:
|
||||||
|
number: 80
|
@ -9,8 +9,10 @@
|
|||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"lint:fix": "eslint --fix . --ext .ts",
|
"lint:fix": "eslint --fix . --ext .ts",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"docker:build": "pnpm run build && docker image build . -t glmdev/mathy",
|
"cd:build": "pnpm run build && docker image build . -t glmdev/mathy",
|
||||||
"docker:push": "docker push glmdev/mathy"
|
"cd:push": "docker push glmdev/mathy",
|
||||||
|
"cd:deploy": "kubectl apply -f deploy.yaml",
|
||||||
|
"cd:rollout": "kubectl rollout restart deployment/mathy"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuetify/vite-plugin": "1.0.0-alpha.10",
|
"@vuetify/vite-plugin": "1.0.0-alpha.10",
|
||||||
|
Loading…
Reference in New Issue
Block a user