117 lines
2.4 KiB
YAML
117 lines
2.4 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: 2
|
|
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
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: blog
|
|
namespace: blog
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
|
traefik.ingress.kubernetes.io/frontend-entry-points: http,https
|
|
traefik.ingress.kubernetes.io/redirect-entry-point: https
|
|
traefik.ingress.kubernetes.io/redirect-permanent: "true"
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- marcusnoble.co.uk
|
|
secretName: blog-ingress
|
|
rules:
|
|
- host: marcusnoble.co.uk
|
|
http:
|
|
paths:
|
|
- path: /
|
|
backend:
|
|
serviceName: blog
|
|
servicePort: 80
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: blog-www
|
|
namespace: blog
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
|
traefik.ingress.kubernetes.io/frontend-entry-points: http,https
|
|
traefik.ingress.kubernetes.io/redirect-entry-point: https
|
|
traefik.ingress.kubernetes.io/redirect-permanent: "true"
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- www.marcusnoble.co.uk
|
|
secretName: blog-www-ingress
|
|
rules:
|
|
- host: www.marcusnoble.co.uk
|
|
http:
|
|
paths:
|
|
- path: /
|
|
backend:
|
|
serviceName: blog
|
|
servicePort: 80
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: blog-blog
|
|
namespace: blog
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
|
traefik.ingress.kubernetes.io/frontend-entry-points: http,https
|
|
traefik.ingress.kubernetes.io/redirect-entry-point: https
|
|
traefik.ingress.kubernetes.io/redirect-permanent: "true"
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- blog.marcusnoble.co.uk
|
|
secretName: blog-blog-ingress
|
|
rules:
|
|
- host: blog.marcusnoble.co.uk
|
|
http:
|
|
paths:
|
|
- path: /
|
|
backend:
|
|
serviceName: blog
|
|
servicePort: 80
|
|
|