cattle-cluster-agent不停重启无法连接到集群

问题

集群内创建了一个test namespace,本地导入了helm chart,安装应用后,发现cattle-cluster-agent不停重启,并且rancher上显示无法连接到集群,报错如下:

file

解决

参考issue:https://github.com/rancher/rancher/issues/35971

环境里有helm脏数据导致,查看脏数据:

#!/bin/bash

helm2_releases=$(kubectl get configmaps -A -l OWNER=TILLER -o=jsonpath='{range .items[*]}{.metadata.namespace}{","}{.metadata.name}{"\n"}{end}')

for release in $helm2_releases; do
        ns=$(echo $release | cut -f1 -d,)
        name=$(echo $release | cut -f2 -d,)
        kubectl get cm -n $ns $name -o jsonpath='{.data.release}' | base64 -d | gunzip  > /dev/null
        if [[ $? != "0" ]]; then
                echo "Got a dirty data: $ns--$name"
        fi
done

file

删除脏数据

file

恢复

file

0 0 投票数
文章评分
订阅评论
提醒
guest

0 评论
内联反馈
查看所有评论

相关文章

开始在上面输入您的搜索词,然后按回车进行搜索。按ESC取消。

返回顶部
0
希望看到您的想法,请您发表评论x