apiVersion: apps/v1
kind: Deployment
metadata:
  name: ingress-nginx-demo
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: ingress-nginx-demo
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: ingress-nginx-demo
    spec:
      containers:
      - name: httpd
        image: httpd
        ports:
          - containerPort: 80
            name: http

---

apiVersion: v1
kind: Service
metadata:
  name: ingress-nginx-demo
spec:
  type: ClusterIP
  selector:
    app.kubernetes.io/name: ingress-nginx-demo
  ports:
  - name: ingress-nginx-demo
    protocol: TCP
    port: 80
    targetPort: http

---

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-nginx-demo
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt
    external-dns.alpha.kubernetes.io/ttl: "60"
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.org/client-max-body-size: "0"
spec:
  ingressClassName: nginx
  rules:
  - host: demo.reeseapps.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: ingress-nginx-demo
            port:
              number: 80
  tls:
  - hosts:
    - demo.reeseapps.com
    secretName: ingress-nginx-demo-tls-cert
