cluster.fun/manifests/blog/blog.yaml
Marcus Noble f516ee38ae
Switched to nginx
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2021-10-16 12:07:23 +01:00

133 lines
2.5 KiB
YAML

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:
replicas: 4
selector:
matchLabels:
app: blog
template:
metadata:
labels:
app: blog
spec:
containers:
- name: web
image: docker.cluster.fun/averagemarcus/blog:latest
imagePullPolicy: Always
ports:
- containerPort: 8000
name: web
resources:
limits:
memory: 200Mi
requests:
memory: 200Mi
livenessProbe:
httpGet:
path: /healthz
port: web
initialDelaySeconds: 10
readinessProbe:
httpGet:
path: /healthz
port: web
initialDelaySeconds: 10
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: blog
namespace: blog
annotations:
cert-manager.io/cluster-issuer: letsencrypt
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
ingressClassName: nginx
tls:
- hosts:
- marcusnoble.co.uk
secretName: blog-ingress
rules:
- host: marcusnoble.co.uk
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: blog
port:
number: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: blog-www
namespace: blog
annotations:
cert-manager.io/cluster-issuer: letsencrypt
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
ingressClassName: nginx
tls:
- hosts:
- www.marcusnoble.co.uk
secretName: blog-www-ingress
rules:
- host: www.marcusnoble.co.uk
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: blog
port:
number: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: blog-blog
namespace: blog
annotations:
cert-manager.io/cluster-issuer: letsencrypt
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
ingressClassName: nginx
tls:
- hosts:
- blog.marcusnoble.co.uk
secretName: blog-blog-ingress
rules:
- host: blog.marcusnoble.co.uk
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: blog
port:
number: 80