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-2026 CODEPRJ.COM