k8s dashboard部署,使用traefik暴露问题记录


k8s dashboard部署、ing配置后,访问是报500 如下问题

http: TLS handshake error from 10.233.96.165:53192: remote error: tls: bad certificate

因为k8s-dashboard后台监听8443,需要配置traefik frontend Entry Points https:
修改traefik ingress的cm:

    insecureSkipVerify = true            
    defaultEntryPoints = ["http", "httpn", "https"]            
    [entryPoints]            
      [entryPoints.http]            
      address = ":80"            
      compress = true            
      #[entryPoints.http.redirect]            #http转发到https,如果配置,需要修改nginx,指向traefik的https的端口
      #entryPoint = "https"            
      [entryPoints.httpn]            
      address = ":8880"            
      compress = true            
      [entryPoints.traefik]            
      address = ":8080"            
      [entryPoints.https]            #配置https
      address = ":443"            
      [entryPoints.https.tls]            
      [[entryPoints.https.tls.certificates]]            
      certFile = "/opt/k8s-dashboard/certs/tls.crt"            
      keyFile = "/opt/k8s-dashboard/certs/tls.key"    

修改cm后需要重启pod生效


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM