Ingress診斷
更新時間 2025-06-23 20:03:29
最近更新時間: 2025-06-23 20:03:29
分享文章
本節介紹了Ingress診斷對應的檢查項以及修復方案。
Ingress診斷主要包括Ingress注解、Ingress Controller組件啟動參數等檢查項。
注意
使用故障診斷功能時,系統將在您的集群節點上執行數據采集程序并收集檢查結果。采集的信息包括系統版本,負載、Docker、Kubelet等運行狀態及系統日志中關鍵錯誤信息。數據采集程序不會采集您的業務信息及敏感數據。
Ingress診斷對應的檢查項
根據集群配置,具體檢查項可能稍有不同。實際結果請以診斷頁面結果為準。
| 檢查項名稱 | 說明 | 修復方案 |
| 檢查Ingress是否存在 | 檢查是否通過提供的信息找到了對應的Ingress資源。 | 檢查所提供的URL信息是否有能夠對應的Ingress規則。若URL信息無誤,可能是Ingress規則存在問題。 |
| Ingress名稱 | 展示所匹配到的Ingress規則名稱。 | 無 |
| 檢查是否使用了nginx.ingress.kubernetes.io/session-cookie-hash廢棄注解 | 檢查是否使用了在0.24.0版本廢棄的nginx.ingress.kubernetes.io/session-cookie-hash注解key。 | 確認當前Ingress Controller版本,移除該注解或使用其他注解代替。 |
| 檢查是否使用了nginx.ingress.kubernetes.io/base-url-scheme廢棄注解 | 檢查是否使用了在0.22.0版本廢棄的nginx.ingress.kubernetes.io/base-url-scheme注解key。 | 確認當前Ingress Controller版本,移除該注解或使用其他注解代替。 |
| 檢查是否使用了nginx.ingress.kubernetes.io/secure-backends廢棄注解 | 檢查是否使用了在0.21.0版本廢棄的nginx.ingress.kubernetes.io/secure-backends注解key。 | 確認當前Ingress Controller版本,移除該注解或使用其他注解代替。 |
| 檢查是否使用了nginx.com/nginx.org注解 | 檢查是否使用了不兼容社區版Nginx Ingress Controller的商業版Ingress注解key(以nginx.com/nginx.org開頭)。 | 請使用對應功能的正確用法。關于Ingress更多信息,請參見社區官方文檔。(引用到官方文檔) |
| 檢查是否使用了nginx.ingress.kubernetes.io/grpc-backend廢棄注解 | 檢查是否使用了在0.21.0版本廢棄的nginx.ingress.kubernetes.io/grpc-backend注解key。 | 確認當前Ingress Controller版本,移除該注解或使用其他注解代替。 |
| 檢查是否使用了nginx.ingress.kubernetes.io/mirror-uri廢棄注解 | 檢查是否使用了在0.24.0版本廢棄的nginx.ingress.kubernetes.io/mirror-uri注解key。 | 確認當前Ingress Controller版本,移除該注解或使用其他注解代替。 |
| 檢查是否啟用了canary | 使用了nginx.ingress.kubernetes.io/canary相關注解,但value值為"false‘,如果需要使用灰度功能,請指定nginx.ingress.kubernetes.io/canary: "true"。 | 如果您需要在該Ingress上開啟Canary功能,請在Ingress規則上添加nginx.ingress.kubernetes.io/canary: "true"注解。 |
| 檢查Ingress是否存在異常事件 | 檢查集群中是否存在與該Ingress相關的異常事件。 | 檢查并處理異常事件描述信息中的報錯,如無法解決,請提交工單處理。 |
| 檢查Ingress Controller是否存在 | 檢查Ingress使用的Ingress Class對應的Ingress Controller工作負載是否存在。 | 確認kube-system命名空間下Ingress Controller工作負載存在。如不存在,請嘗試安裝相關Ingress Controller插件。 |
| Ingress Controller就緒Pod比值 | 檢查Ingress Controller工作負載對應的就緒Pod比值。 | 檢查Ingress Controller Pod狀態,保證Pod存在且處于Ready狀態。 |
| 檢查是否使用了--force-namespace-isolation廢棄的啟動參數 | 檢查Ingress Controller是否使用了在0.24.0版本廢棄的"--force-namespace-isolation"啟動參數。 | 確認當前Ingress Controller版本,移除該啟動參數。 |
| 檢查是否使用了--sort-backends廢棄的啟動參數 | 檢查Ingress Controller是否使用了在0.22.0版本廢棄的"--sort-backends"啟動參數。 | 確認當前Ingress Controller版本,移除該啟動參數。 |
| 檢查Ingress Controller Pod中是否存在error日志 | 檢查Ingress Controller Pod最近的日志中是否包含error錯誤日志。 | 檢查并處理Ingress Controller Pod中報錯日志,如Service端口沖突等。 |