Files
k8s-docs/k8s/kevisual.cn/sh/debug-www-kevisual.sh
2025-12-05 18:13:42 +08:00

66 lines
2.1 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 诊断 www.kevisual.cn 访问问题
# tags: debug, troubleshooting, traefik, ingress
# description: 诊断 www.kevisual.cn 无法访问的问题
# title: www.kevisual.cn 诊断脚本
# createdAt: 2025-12-05
echo "========================================"
echo "1. 检查 Traefik CRD 是否存在"
echo "========================================"
kubectl api-resources | grep ingressroute
echo ""
echo "========================================"
echo "2. 检查 IngressRoute 资源"
echo "========================================"
kubectl get ingressroute -n default
echo ""
echo "========================================"
echo "3. 检查 kevisual-external 服务"
echo "========================================"
kubectl get svc kevisual-external -n default
echo ""
echo "========================================"
echo "4. 检查 EndpointSlice"
echo "========================================"
kubectl get endpointslice -n default | grep kevisual
echo ""
echo "========================================"
echo "5. 检查 Traefik Pod 状态"
echo "========================================"
kubectl get pod -n traefik
echo ""
echo "========================================"
echo "6. 检查 Traefik 服务"
echo "========================================"
kubectl get svc -n traefik
echo ""
echo "========================================"
echo "7. 描述 www-kevisual-https IngressRoute"
echo "========================================"
kubectl describe ingressroute www-kevisual-https -n default 2>&1
echo ""
echo "========================================"
echo "8. 检查 Traefik 日志最近50行"
echo "========================================"
kubectl logs -n traefik -l app.kubernetes.io/name=traefik --tail=50 2>&1 | grep -i "kevisual\|www.kevisual\|error" || echo "未找到相关日志"
echo ""
echo "========================================"
echo "9. 测试访问 www.kevisual.cn"
echo "========================================"
curl -I https://www.kevisual.cn 2>&1 | head -10
echo ""
echo "========================================"
echo "10. 测试访问 kevisual.cn"
echo "========================================"
curl -I https://kevisual.cn 2>&1 | head -10