gpt4 book ai didi

docker - kubernetes仪表板无法到达节点,GUI中断

转载 作者:行者123 更新时间:2023-12-02 21:32:07 27 4
gpt4 key购买 nike

我正在尝试设置Web仪表板。安装似乎有效:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml
kubectl proxy --address='172.29.248.55' --disable-filter=true -v=5
但该应用由于无法到达一个节点而拒绝启动:
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "error trying to reach service: dial tcp 172.16.69.193:8443: i/o timeout",
"code": 500
}
使用journaclctl检查kubelet,向我显示了这一点:
"myserver.mydomain.com", "type":"ipipTunnelAddress"}}, v3.AllocationAttribute{AttrPrimary:(*string)(0xc000222be0), AttrSecondary:map[string]string{"namespace":"kubernetes-dashboard", "node":"myserver.mydomain.com", "pod":"dashboard-metrics-scraper-7b59f7d4df-rfrzq"}}}, Deleted:false}} error=Operation cannot be fulfilled on ipamblocks.crd.projectcalico.org "172-16-69-192-26": the object has been modified; please apply your changes to the latest version and try again
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.610 [INFO][50949] ipam.go 963: Failed to update block block=172.16.69.192/26 error=update conflict: IPAMBlock(172-16-69-192-26) handle="k8s-pod-network.131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" host="myserver.mydomain.com"
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.639 [INFO][50949] ipam.go 936: Attempting to assign 1 addresses from block block=172.16.69.192/26 handle="k8s-pod-network.131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" host="myserver.mydomain.com"
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.642 [INFO][50949] ipam.go 1397: Creating new handle: k8s-pod-network.131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.649 [INFO][50949] ipam.go 959: Writing block in order to claim IPs block=172.16.69.192/26 handle="k8s-pod-network.131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" host="myserver.mydomain.com"
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.658 [INFO][50949] ipam.go 972: Successfully claimed IPs: [172.16.69.194/26] block=172.16.69.192/26 handle="k8s-pod-network.131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" host="myserver.mydomain.com"
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.658 [INFO][50949] ipam.go 695: Auto-assigned 1 out of 1 IPv4s: [172.16.69.194/26] handle="k8s-pod-network.131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" host="myserver.mydomain.com"
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.658 [INFO][50949] ipam_plugin.go 255: Calico CNI IPAM assigned addresses IPv4=[172.16.69.194/26] IPv6=[] ContainerID="131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" HandleID="k8s-pod-network.131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" Workload="myserver.mydomain.com-k8s-dashboard--metrics--scraper--7b59f7d4df--rfrzq-eth0"
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.661 [INFO][50905] k8s.go 372: Populated endpoint ContainerID="131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" Namespace="kubernetes-dashboard" Pod="dashboard-metrics-scraper-7b59f7d4df-rfrzq" WorkloadEndpoint="myserver.mydomain.com-k8s-dashboard--metrics--scraper--7b59f7d4df--rfrzq-eth0" endpoint=&v3.WorkloadEndpoint{TypeMeta:v1.TypeMeta{Kind:"WorkloadEndpoint", APIVersion:"projectcalico.org/v3"}, ObjectMeta:v1.ObjectMeta{Name:"myserver.mydomain.com-k8s-dashboard--metrics--scraper--7b59f7d4df--rfrzq-eth0", GenerateName:"dashboard-metrics-scraper-7b59f7d4df-", Namespace:"kubernetes-dashboard", SelfLink:"", UID:"5c257fd8-ad0e-4d60-885a-c2ff673a7b96", ResourceVersion:"126017", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63737501137, loc:(*time.Location)(0x27947e0)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"k8s-app":"dashboard-metrics-scraper", "pod-template-hash":"7b59f7d4df", "projectcalico.org/namespace":"kubernetes-dashboard", "projectcalico.org/orchestrator":"k8s", "projectcalico.org/serviceaccount":"kubernetes-dashboard"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Spec:v3.WorkloadEndpointSpec{Orchestrator:"k8s", Workload:"", Node:"myserver.mydomain.com", ContainerID:"", Pod:"dashboard-metrics-scraper-7b59f7d4df-rfrzq", Endpoint:"eth0", IPNetworks:[]string{"172.16.69.194/32"}, IPNATs:[]v3.IPNAT(nil), IPv4Gateway:"", IPv6Gateway:"", Profiles:[]string{"kns.kubernetes-dashboard", "ksa.kubernetes-dashboard.kubernetes-dashboard"}, InterfaceName:"cali5d0b61a63e5", MAC:"", Ports:[]v3.EndpointPort(nil)}}
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.661 [INFO][50905] k8s.go 373: Calico CNI using IPs: [172.16.69.194/32] ContainerID="131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" Namespace="kubernetes-dashboard" Pod="dashboard-metrics-scraper-7b59f7d4df-rfrzq" WorkloadEndpoint="myserver.mydomain.com-k8s-dashboard--metrics--scraper--7b59f7d4df--rfrzq-eth0"
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.661 [INFO][50905] dataplane_linux.go 66: Setting the host side veth name to cali5d0b61a63e5 ContainerID="131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" Namespace="kubernetes-dashboard" Pod="dashboard-metrics-scraper-7b59f7d4df-rfrzq" WorkloadEndpoint="myserver.mydomain.com-k8s-dashboard--metrics--scraper--7b59f7d4df--rfrzq-eth0"
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.663 [INFO][50905] dataplane_linux.go 420: Disabling IPv4 forwarding ContainerID="131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" Namespace="kubernetes-dashboard" Pod="dashboard-metrics-scraper-7b59f7d4df-rfrzq" WorkloadEndpoint="myserver.mydomain.com-k8s-dashboard--metrics--scraper--7b59f7d4df--rfrzq-eth0"
Oct 05 09:25:38 myserver.mydomain.com kubelet[58981]: 2020-10-05 09:25:38.671 [WARNING][50905] dataplane_linux.go 404: failed to set net.ipv6.conf.cali5d0b61a63e5.accept_ra=0: open /proc/sys/net/ipv6/conf/cali5d0b61a63e5/accept_ra: no such file or directory ContainerID="131460cb8642e07ad2f15f475723906b65419624b4aec390ac2ded92286f68e7" Namespace="kubernetes-dashboard" Pod="dashboard-metrics-scraper-7b59f7d4df-rfrzq" WorkloadEndpoint="myserver.mydomain.com-k8s-dashboard--metrics--scraper--7b59f7d4df--rfrzq-eth0"
我检查了仪表板的错误日志,并反复显示以下内容
kubectl logs kubernetes-dashboard-74d688b6bc-btrp6 --namespace=kubernetes-dashboard
2020/10/05 18:07:42 Metric client health check failed: an error on the server ("unknown") has prevented the request from succeeding (get services dashboard-metrics-scraper). Retrying in 30 seconds.
2020/10/05 18:08:42 Metric client health check failed: an error on the server ("unknown") has prevented the request from succeeding (get services dashboard-metrics-scraper). Retrying in 30 seconds.
kubectl logs dashboard-metrics-scraper-7b59f7d4df-rfrzq --namespace=kubernetes-dashboard
{"level":"error","msg":"Error scraping node metrics: the server could not find the requested resource (get nodes.metrics.k8s.io)","time":"2020-10-05T18:20:39Z"}
172.29.192.115 - - [05/Oct/2020:18:20:43 +0000] "GET / HTTP/1.1" 200 6 "" "kube-probe/1.19"
172.29.192.115 - - [05/Oct/2020:18:20:53 +0000] "GET / HTTP/1.1" 200 6 "" "kube-probe/1.19"
172.29.192.115 - - [05/Oct/2020:18:21:03 +0000] "GET / HTTP/1.1" 200 6 "" "kube-probe/1.19"
172.29.192.115 - - [05/Oct/2020:18:21:13 +0000] "GET / HTTP/1.1" 200 6 "" "kube-probe/1.19"
172.29.192.115 - - [05/Oct/2020:18:21:23 +0000] "GET / HTTP/1.1" 200 6 "" "kube-probe/1.19"


所以我有两个问题:
  • 有一种忽略失败主机的方法,因此GUI可以呈现其他所有内容
  • 知道该错误意味着什么吗?我正在使用Calico作为CNI。

  • 谢谢!
    -乔斯

    最佳答案

    事实证明,导致此错误的节点是错误的IP地址(多宿主)。发布正确的IP地址(kubelet --node-ip xx.xx.xx.xx)并重新加入后,仪表板恢复。

    关于docker - kubernetes仪表板无法到达节点,GUI中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64214144/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com