cluster.fun/manifests/blog.yaml

126 lines
2.5 KiB
YAML
Raw Normal View History

2020-05-08 11:45:00 +00:00
apiVersion: v1
kind: Namespace
metadata:
name: blog
labels:
goldilocks.fairwinds.com/enabled: "true"
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:
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:
cpu: 25m
2020-06-05 21:51:40 +00:00
memory: 100Mi
requests:
cpu: 25m
2020-06-05 21:51:40 +00:00
memory: 100Mi
2020-05-08 11:45:00 +00:00
---
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