From 206cc41f2856a1cb5fd555568f63ac05b5cbf0c5 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Fri, 8 May 2020 12:45:00 +0100 Subject: [PATCH] Added blog --- manifests/blog.yaml | 116 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 manifests/blog.yaml diff --git a/manifests/blog.yaml b/manifests/blog.yaml new file mode 100644 index 0000000..48a6892 --- /dev/null +++ b/manifests/blog.yaml @@ -0,0 +1,116 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: blog +--- +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 +--- +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 +