Traefik v2 / ping返回404

时间:2020-09-25 04:43:27

标签: traefik traefik-ingress

我正在尝试为我的云kubernetes集群在websecure端口上设置/ ping。 这是带有ping和端口的traefik部署yaml配置的一部分:

type brandsRepositoryImpl struct {
    db *gorm.DB
}

func NewBrandsRepository(db *gorm.DB) *brandsRepositoryImpl {
    return &brandsRepositoryImpl{db}
}

我为此traefik提供的服务仅开放给443。

     containers:
      - args:
        - --entryPoints.traefik.address=:9000/tcp
        - --entryPoints.web.address=:8000/tcp
        - --entryPoints.websecure.address=:8443/tcp
        - --providers.kubernetescrd
        - --providers.kubernetesingress
        - --accesslog=true
        - --ping=true
        - --ping.entryPoint=websecure
        image: traefik:2.2.5
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /ping
            port: 8443
            scheme: HTTP
       name: traefik
        ports:
        - containerPort: 9000
          name: traefik
          protocol: TCP
        - containerPort: 8000
          name: web
          protocol: TCP
        - containerPort: 8443
          name: websecure
          protocol: TCP
        readinessProbe:
          failureThreshold: 1
          httpGet:
            path: /ping
            port: 8443
            scheme: HTTP

GET / ping HTTP / 1.1“ 404 19”-“”-“ 1238”-“”-“ 0ms

      ports:
      - port: 443
        name: websecure
        targetPort: "websecure"
        protocol: "TCP"
---

Looking at the traefik logs, I am getting 404:

0 个答案:

没有答案