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 +