Tarefik Ingress does not return HTTP/HTTPS response.

12/21/2018

My website doesn't generate any HTTP certs using LetsEncrypt, doesn't even return a response. This is for test purposes so is using a basic NGINX image that I want to serve over HTTPS.

I have an ingress type that looks like this:

   apiVersion: v1
kind: Service
metadata:
  name: nginxtest
  labels:
    app: nginx
spec:
  selector:
    k8s-app: traefik-ingress-lb
  ports:
    - name: http
      port: 80
      targetPort: 80
      protocol: TCP
  selector:
    app: nginx

---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nginx-ingress
  annotations:
    kubernetes.io/ingress.class: traefik
spec:
  rules:
  - host: nginx.example.com
    http:
      paths:
      - path: /
        backend:
          serviceName: nginxtest
          servicePort: http

My TOML Config Map looks like the below:

apiVersion: v1
kind: ConfigMap
metadata:
  name: traefik-conf
  namespace: kube-system
data:
  traefik.toml: |
    defaultEntryPoints = ["http","https"]
    debug = false
    logLevel = "ERROR"
    #Config to redirect http to https
    [entryPoints]
      [entryPoints.http]
        address = ":80"
        compress = true
        [entryPoints.http.redirect]
        entryPoint = "https"
      [entryPoints.https]
        address = ":443"
        compress = true
        [entryPoints.https.tls]
    [api]
      [api.statistics]
        recentErrors = 10
    [kubernetes]
    [ping]
      entryPoint = "http"
    [accessLog]
    [acme]
      email = "a@b.com"
      storage = "certs/acme.json"
      acmeLogging = true
      entryPoint = "https"
      OnHostRule = true
      #caServer = "https://acme-staging-v02.api.letsencrypt.org/directory"
      [acme.httpChallenge]
        entryPoint="http"

Any help is appreciated, please point out any errors.

-- Rutnet
kubernetes
traefik
traefik-ingress

0 Answers