69 lines
1.2 KiB
YAML
69 lines
1.2 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: til
|
|
namespace: til
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 80
|
|
targetPort: web
|
|
name: web
|
|
selector:
|
|
app: til
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: til
|
|
namespace: til
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: til
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: til
|
|
spec:
|
|
containers:
|
|
- name: web
|
|
image: docker.cluster.fun/averagemarcus/til:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 80
|
|
name: web
|
|
resources:
|
|
limits:
|
|
memory: 20Mi
|
|
requests:
|
|
memory: 20Mi
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: til
|
|
namespace: til
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
|
spec:
|
|
ingressClassName: nginx
|
|
tls:
|
|
- hosts:
|
|
- til.marcusnoble.co.uk
|
|
secretName: til-ingress
|
|
rules:
|
|
- host: til.marcusnoble.co.uk
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: ImplementationSpecific
|
|
backend:
|
|
service:
|
|
name: til
|
|
port:
|
|
number: 80
|
|
|