2020-05-08 11:45:00 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: blog
|
|
|
|
namespace: blog
|
|
|
|
spec:
|
|
|
|
type: ClusterIP
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
targetPort: 8000
|
|
|
|
name: web
|
|
|
|
selector:
|
|
|
|
app: blog
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: blog
|
|
|
|
namespace: blog
|
|
|
|
spec:
|
2022-01-15 10:49:21 +00:00
|
|
|
replicas: 2
|
2020-05-08 11:45:00 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: blog
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: blog
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: web
|
2022-05-15 12:18:31 +00:00
|
|
|
image: rg.fr-par.scw.cloud/averagemarcus/blog:latest
|
2020-05-08 11:45:00 +00:00
|
|
|
imagePullPolicy: Always
|
|
|
|
ports:
|
|
|
|
- containerPort: 8000
|
|
|
|
name: web
|
2020-06-05 21:17:50 +00:00
|
|
|
resources:
|
|
|
|
limits:
|
2020-06-06 14:24:56 +00:00
|
|
|
memory: 200Mi
|
2020-06-05 21:17:50 +00:00
|
|
|
requests:
|
2020-06-06 14:24:56 +00:00
|
|
|
memory: 200Mi
|
2021-06-15 04:08:51 +00:00
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: web
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: web
|
|
|
|
initialDelaySeconds: 10
|
2020-05-08 11:45:00 +00:00
|
|
|
---
|
2021-10-16 06:31:19 +00:00
|
|
|
apiVersion: networking.k8s.io/v1
|
2020-05-08 11:45:00 +00:00
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: blog
|
|
|
|
namespace: blog
|
|
|
|
annotations:
|
|
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
2021-10-16 08:46:06 +00:00
|
|
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
2020-05-08 11:45:00 +00:00
|
|
|
spec:
|
2021-10-16 08:46:06 +00:00
|
|
|
ingressClassName: nginx
|
2020-05-08 11:45:00 +00:00
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- marcusnoble.co.uk
|
|
|
|
secretName: blog-ingress
|
|
|
|
rules:
|
|
|
|
- host: marcusnoble.co.uk
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
2021-10-16 06:31:19 +00:00
|
|
|
pathType: ImplementationSpecific
|
2020-05-08 11:45:00 +00:00
|
|
|
backend:
|
2021-10-16 06:31:19 +00:00
|
|
|
service:
|
|
|
|
name: blog
|
|
|
|
port:
|
|
|
|
number: 80
|
2020-05-08 11:45:00 +00:00
|
|
|
|
|
|
|
---
|
2021-10-16 06:31:19 +00:00
|
|
|
apiVersion: networking.k8s.io/v1
|
2020-05-08 11:45:00 +00:00
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: blog-www
|
|
|
|
namespace: blog
|
|
|
|
annotations:
|
|
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
2021-10-16 08:46:06 +00:00
|
|
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
2020-05-08 11:45:00 +00:00
|
|
|
spec:
|
2021-10-16 08:46:06 +00:00
|
|
|
ingressClassName: nginx
|
2020-05-08 11:45:00 +00:00
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- www.marcusnoble.co.uk
|
|
|
|
secretName: blog-www-ingress
|
|
|
|
rules:
|
|
|
|
- host: www.marcusnoble.co.uk
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
2021-10-16 06:31:19 +00:00
|
|
|
pathType: ImplementationSpecific
|
2020-05-08 11:45:00 +00:00
|
|
|
backend:
|
2021-10-16 06:31:19 +00:00
|
|
|
service:
|
|
|
|
name: blog
|
|
|
|
port:
|
|
|
|
number: 80
|
2020-05-08 11:45:00 +00:00
|
|
|
|
|
|
|
---
|
2021-10-16 06:31:19 +00:00
|
|
|
apiVersion: networking.k8s.io/v1
|
2020-05-08 11:45:00 +00:00
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: blog-blog
|
|
|
|
namespace: blog
|
|
|
|
annotations:
|
|
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
2021-10-16 08:46:06 +00:00
|
|
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
2020-05-08 11:45:00 +00:00
|
|
|
spec:
|
2021-10-16 08:46:06 +00:00
|
|
|
ingressClassName: nginx
|
2020-05-08 11:45:00 +00:00
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- blog.marcusnoble.co.uk
|
|
|
|
secretName: blog-blog-ingress
|
|
|
|
rules:
|
|
|
|
- host: blog.marcusnoble.co.uk
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
2021-10-16 06:31:19 +00:00
|
|
|
pathType: ImplementationSpecific
|
2020-05-08 11:45:00 +00:00
|
|
|
backend:
|
2021-10-16 06:31:19 +00:00
|
|
|
service:
|
|
|
|
name: blog
|
|
|
|
port:
|
|
|
|
number: 80
|
2020-05-08 11:45:00 +00:00
|
|
|
|