ajusteno k8s
This commit is contained in:
parent
a6c1594f30
commit
12199fb300
5 changed files with 59 additions and 3 deletions
|
|
@ -81,6 +81,7 @@ steps:
|
||||||
- kubectl get pods -n gohorsejobsdev
|
- kubectl get pods -n gohorsejobsdev
|
||||||
- kubectl apply -f k8s/dev/backend-deployment.yaml
|
- kubectl apply -f k8s/dev/backend-deployment.yaml
|
||||||
- kubectl apply -f k8s/dev/backend-service.yaml
|
- kubectl apply -f k8s/dev/backend-service.yaml
|
||||||
|
- kubectl apply -f k8s/dev/backend-ingress-dev.yaml
|
||||||
- kubectl rollout restart deployment/gohorse-backend -n gohorsejobsdev
|
- kubectl rollout restart deployment/gohorse-backend -n gohorsejobsdev
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
@ -167,6 +168,7 @@ steps:
|
||||||
- kubectl get pods -n gohorsejobshml
|
- kubectl get pods -n gohorsejobshml
|
||||||
- kubectl apply -f k8s/hml/backend-deployment.yaml
|
- kubectl apply -f k8s/hml/backend-deployment.yaml
|
||||||
- kubectl apply -f k8s/hml/backend-service.yaml
|
- kubectl apply -f k8s/hml/backend-service.yaml
|
||||||
|
- kubectl apply -f k8s/dev/backend-ingress-hml.yaml
|
||||||
- kubectl rollout restart deployment/gohorse-backend -n gohorsejobshml
|
- kubectl rollout restart deployment/gohorse-backend -n gohorsejobshml
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
27
k8s/dev/backend-ingress-dev.yaml
Normal file
27
k8s/dev/backend-ingress-dev.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: gohorse-backend-ingress-dev
|
||||||
|
namespace: gohorsejobsdev
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-dns
|
||||||
|
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: web,websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
|
rules:
|
||||||
|
- host: gohorse-backend-dev.gohorsejobs.com
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: gohorse-backend
|
||||||
|
port:
|
||||||
|
number: 3000
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- gohorse-backend-dev.gohorsejobs.com
|
||||||
|
secretName: gohorse-backend-dev-cert
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: gohorse-backend
|
name: gohorse-backend-hml
|
||||||
namespace: gohorsejobsdev
|
namespace: gohorsejobsdev
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
|
|
@ -10,4 +10,4 @@ spec:
|
||||||
- name: http
|
- name: http
|
||||||
port: 8521
|
port: 8521
|
||||||
targetPort: 8521
|
targetPort: 8521
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: gohorse-backend
|
name: gohorse-backend-hml
|
||||||
namespace: gohorsejobshml
|
namespace: gohorsejobshml
|
||||||
spec:
|
spec:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
|
|
|
||||||
27
k8s/hml/backend-ingress-hml.yaml
Normal file
27
k8s/hml/backend-ingress-hml.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: gohorse-backend-ingress-hml
|
||||||
|
namespace: gohorsejobsdev
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-dns
|
||||||
|
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: web,websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
|
rules:
|
||||||
|
- host: gohorse-backend-hml.gohorsejobs.com
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: gohorse-backend
|
||||||
|
port:
|
||||||
|
number: 3000
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- gohorse-backend-hml.gohorsejobs.com
|
||||||
|
secretName: gohorse-backend-hml-cert
|
||||||
Loading…
Reference in a new issue