【发布时间】:2021-06-16 08:52:36
【问题描述】:
我有一个 EKS 1.18 集群。当我尝试部署 k8s 仪表板时,它失败并出现以下错误。
另外,我的仪表板 svc 使用 loadBalancer。
kind: Service
apiVersion: v1
metadata:
labels:
k8s-app: kubernetes-dashboard
annotations:
external-dns.alpha.kubernetes.io/hostname: "test.xxx.net"
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
name: kubernetes-dashboard
namespace: kubernetes-dashboard
spec:
type: LoadBalancer
ports:
- port: 443
targetPort: 8443
selector:
k8s-app: kubernetes-dashboard
请告诉我TLS handshake error 是什么意思?我应该怎么做才能修复这个错误?
日志:
2021/03/18 22:03:08 http: TLS handshake error from xx.xxx.x.x:8279: EOF
2021/03/18 22:03:08 http: TLS handshake error from xx.xxx.x.x:34935: EOF
2021/03/18 22:03:08 http: TLS handshake error from xx.xxx.x.x:24437: EOF
2021/03/18 22:03:08 http: TLS handshake error from xx.xxx.x.x:64552: EOF
2021/03/18 22:03:10 http: TLS handshake error from xx.xxx.x.x:5481: EOF
代码:
https://github.com/kubernetes/dashboard/releases/tag/v2.0.3
https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.3/aio/deploy/recommended.yaml
kubectl version
+ kubectl version Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.1", GitCommit:"d647ddbd755faf07169599a625faf302ffc34458", GitTreeState:"clean", BuildDate:"2019-10-02T23:49:20Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"18+", GitVersion:"v1.18.9-eks-d1db3c", GitCommit:"d1db3c46e55f95d6a7d3e5578689371318f95ff9", GitTreeState:"clean", BuildDate:"2020-10-20T22:18:07Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
【问题讨论】:
-
您的入口可能不理解仪表板会自行终止 tls 并尝试在那里发送裸 http 请求。因此,无论您使用什么来入口/负载平衡应用程序的流量 - 都应该配置为通过 tls 连接。
-
您究竟是如何访问仪表板的?使用负载均衡器的 IP 地址或某个域?您是否还配置了任何入口资源?
-
使用域名,没有配置任何入口
-
"没有配置任何入口" ---好吧,连接到它的人会在没有 tls 的情况下执行 http
标签: kubernetes amazon-eks kubernetes-pod kubernetes-dashboard