公司使用docker单节点方式部署rancher,利用rancehr来操作k8s集群,有一天要访问rancher ui时,发现打不开,然后部署的所有容器也都不能使用,立马到服务器上查看情况,发现rancher容器还在,然后尝试进入容器时,报了错cannot exec in a stopped state: unknown,然后尝试查看rancher日志,发现可以查看
E0712 15:47:03.730752 6 reflector.go:307] github.com/rancher/norman/controller/generic_controller.go:229: Failed to watch *v3.ProjectCatalog: Get https://127.0.0.1:6443/apis/management.cattle.io/v3/watch/projectcatalogs?allowWatchBookmarks=true&resourceVersion=155367341&timeout=30m0s&timeoutSeconds=574: dial tcp 127.0.0.1:6443: connect: connection refused
E0712 15:47:03.730790 6 reflector.go:307] github.com/rancher/norman/controller/generic_controller.go:229: Failed to watch *v3.Catalog: Get https://127.0.0.1:6443/apis/management.cattle.io/v3/watch/catalogs?allowWatchBookmarks=true&

本文记录了一次Rancher UI无法访问及容器服务受限的情况,通过分析日志发现K8s API连接问题和Ingress Controller占用443端口。作者逐步排查并解决了连接拒绝、K3s错误和端口占用问题,最终修复了Rancher与K8s集群的交互。
最低0.47元/天 解锁文章
2362

被折叠的 条评论
为什么被折叠?



