apiVersion: v1
kind: Service
metadata:
  name: talks
  namespace: talks
spec:
  type: ClusterIP
  ports:
  - port: 80
    targetPort: web
    name: web
  selector:
    app: talks
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: talks
  namespace: talks
spec:
  replicas: 1
  selector:
    matchLabels:
      app: talks
  template:
    metadata:
      labels:
        app: talks
    spec:
      containers:
      - name: web
        image: rg.fr-par.scw.cloud/averagemarcus/talks:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 80
          name: web
        resources:
          limits:
            memory: 20Mi
          requests:
            memory: 20Mi
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: talks
  namespace: talks
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/router.tls: "true"
    ingress.kubernetes.io/ssl-redirect: "true"
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
spec:
  tls:
  - hosts:
    - talks.marcusnoble.co.uk
    secretName: talks-ingress
  rules:
  - host: talks.marcusnoble.co.uk
    http:
      paths:
      - path: /
        pathType: ImplementationSpecific
        backend:
          service:
            name: talks
            port:
              number: 80