9. Rancher Kubernetes 组件-注册集群故障排除

Rancher Kubernetes 组件图

注册集群

本文列出的命令/步骤可用于检查你正在注册或已在 Rancher 中注册的集群。

请确保你配置了正确的 kubeconfig(例如,export KUBECONFIG=$PWD/kubeconfig_from_imported_cluster.yml)。

Rancher Agents

Rancher Agent 用于实现与集群的通信(通过 cattle-cluster-agent 的 Kubernetes API)和与节点的通信。

如果 cattle-cluster-agent 无法连接到配置的 server-url,集群将保持在 Pending 状态并显示 Waiting for full cluster configuration

cattle-node-agent

备注

cattle-node-agents 只会在使用 RKE 在 Rancher 创建的集群中显示。

检查每个节点上是否存在 cattle-node-agent pod,状态是否为 Running,并且重启次数不多:

kubectl -n cattle-system get pods -l app=cattle-agent -o wide

输出示例:

NAME                      READY     STATUS    RESTARTS   AGE       IP                NODE
cattle-node-agent-4gc2p   1/1       Running   0          2h        x.x.x.x           worker-1
cattle-node-agent-8cxkk   1/1       Running   0          2h        x.x.x.x           etcd-1
cattle-node-agent-kzrlg   1/1       Running   0          2h        x.x.x.x           etcd-0
cattle-node-agent-nclz9   1/1       Running   0          2h        x.x.x.x           controlplane-0
cattle-node-agent-pwxp7   1/1       Running   0          2h        x.x.x.x           worker-0
cattle-node-agent-t5484   1/1       Running   0          2h        x.x.x.x           controlplane-1
cattle-node-agent-t8mtz   1/1       Running   0          2h        x.x.x.x           etcd-2

检查特定或所有 cattle-node-agent pod 的日志记录:

kubectl -n cattle-system logs -l app=cattle-agent

cattle-cluster-agent

检查 cattle-cluster-agent pod 是否存在于集群中,状态是否为 Running,并且重启次数不多:

kubectl -n cattle-system get pods -l app=cattle-cluster-agent -o wide

输出示例:

NAME                                    READY     STATUS    RESTARTS   AGE       IP           NODE
cattle-cluster-agent-54d7c6c54d-ht9h4   1/1       Running   0          2h        x.x.x.x      worker-1

IT干货+136-6258-1235-CSDN博客

检查 cattle-cluster-agent pod 的日志记录:

kubectl -n cattle-system logs -l app=cattle-cluster-agent
  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

IT干货+136-6258-1235

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值