Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当ingress配置了https后,dashboard启用traefik-ingress时,不能正常访问的问题解决 #403

Closed
lichengx opened this issue Dec 11, 2018 · 1 comment

Comments

@lichengx
Copy link

kubernetes-dashboard配置文件

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name:  kubernetes-dashboard
  namespace: kube-system
  annotations:
    traefik.ingress.kubernetes.io/redirect-entry-point: https
spec:
  rules:
  - host: dashboard.xxxxxxxx.com
    http:
      paths:
      - path: /
        backend:
          serviceName: kubernetes-dashboard
          servicePort: 443

需要traefik-conf的配置文件添加

insecureSkipVerify = true

才能正常访问。
完整的traefik-conf配置如下

apiVersion: v1
kind: ConfigMap
metadata:
  name: traefik-conf
  namespace: kube-system
data:
  traefik.toml: |
    insecureSkipVerify = true
    defaultEntryPoints = ["http", "https"]
    [entryPoints]
      [entryPoints.http]
        address = ":80"
        # 配置http 强制跳转 https
        #[entryPoints.http.redirect]
        #  entryPoint = "https"
      [entryPoints.https]
        address = ":443"
        [entryPoints.https.tls]
          [[entryPoints.https.tls.certificates]]
            CertFile = "/ssl/tls.crt"
            KeyFile = "/ssl/tls.key"

如果是只更新traefik-conf,还需要把traefik-ingress-controller重启一下。
希望对大家有所帮助,希望把

insecureSkipVerify = true

配置项添加进去

@gjmzj
Copy link
Collaborator

gjmzj commented Dec 11, 2018

已经添加进去:)

gjmzj added a commit that referenced this issue Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants