【问题标题】:Traefik 1.7 upgrade breaks kubernetes 1.7.12Traefik 1.7 升级打破 kubernetes 1.7.12
【发布时间】:2019-02-07 22:24:31
【问题描述】:

我们已经 traefik 一年多了,它一直很棒。我们目前在 1.6.6 上,一切都按预期工作,一旦我们尝试升级到 1.7,我们所有的端点都会得到 502。知道为什么会发生这种情况吗?

我们正在尝试升级,因为 NS1 是作为 DNS 提供商引入的,而且 HTTP 挑战似乎不再有效。

这是我们当前的设置:

apiVersion: v1
data:
  traefik.toml: |
    # traefik.toml
    defaultEntryPoints = ["http", "https"]
    [web]
    address = ":8080"

    [entryPoints]
      [entryPoints.http]
        address = ":80"
        [entryPoints.http.redirect]
          entryPoint = "https"

      [entryPoints.https]
      address = ":443"
       [entryPoints.https.redirect]
         [entryPoints.https.tls]

    [kubernetes]
    [acme]
    email = "devops@something.com"
    storage = "/acme/acme.json"
    entryPoint = "https"
    acmeLogging = true
    caServer = "https://acme-v02.api.letsencrypt.org/directory"
    [[acme.domains]]
      main = "something.com"
    [[acme.domains]]
      main = "something.com"
    [acme.httpChallenge]
      entryPoint = "http"
    [retry]
    attempts = 5
    [accessLog]
    [traefikLog]
    filePath = "/acme/traefik.log"
kind: ConfigMap
metadata:
  labels:
    app: traefik
  name: traefik
  namespace: kube-system
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  labels:
    app: traefik
  name: traefik
  namespace: kube-system
spec:
  selector:
    matchLabels:
      app: traefik
  template:
    metadata:
      labels:
        app: traefik
    spec:
      serviceAccountName: traefik-ingress-controller
      hostNetwork: true
      dnsPolicy: ClusterFirst
      nodeSelector: 
        role: edge-routers
      containers:
      - args:
        - --configfile=/config/traefik.toml
        - --kubernetes
        - --api
        - -d
        image: traefik:1.6.6 
        imagePullPolicy: Always
        livenessProbe:
          tcpSocket:
            port: 80
          initialDelaySeconds: 20
        name: traefik
        ports:
        - containerPort: 80
          protocol: TCP
        - containerPort: 443
          protocol: TCP
        - containerPort: 8080
          protocol: TCP
        securityContext:
          privileged: true
        readinessProbe:
          tcpSocket:
            port: 80
          initialDelaySeconds: 20
        volumeMounts:
        - mountPath: /config
          name: config
        - mountPath: /acme
          name: acme
      volumes:
      - configMap:
          name: traefik
        name: config
      - hostPath:
          path: /etc/traefik
        name: acme

似乎我们得到了:

time="2019-02-08T00:40:58Z" level=debug msg="'502 Bad Gateway' 导致:EOF"

【问题讨论】:

    标签: kubernetes traefik traefik-ingress


    【解决方案1】:

    似乎 traefik 增加了它们在字节之间的时间,并且我们的内部缓存因此而超时。通过增加超时来修复。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-07
      • 2016-02-24
      • 1970-01-01
      • 2020-08-06
      • 2017-03-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多