162 lines
5.4 KiB
Plaintext
162 lines
5.4 KiB
Plaintext
# Kubernetes 集群镜像缓存优先级列表(更新版)
|
|
# 生成时间: 2026-01-04(已修正重复部署问题)
|
|
# 用途: 缓存公共仓库镜像到本地 Harbor,提升性能和可靠性
|
|
|
|
## ========================================
|
|
## P0 - 紧急修复(当前真实的拉取失败)
|
|
## ========================================
|
|
|
|
# dev 命名空间的镜像拉取失败是因为镜像不存在于 Harbor,需要先构建:
|
|
# 注意: 这些镜像需要先通过 CI/CD 构建并推送到 Harbor,不是缓存问题
|
|
# - harbor.omniverseai.net/ljwx/backend-template:dev
|
|
# - harbor.omniverseai.net/ljwx/frontend-dashboard:dev
|
|
# - harbor.omniverseai.net/ljwx/quality-dashboard:dev
|
|
|
|
# ⚠️ 重要提示:
|
|
# infra namespace 中的 loki/tempo 是重复部署,应该直接删除:
|
|
# kubectl delete statefulset -n infra loki tempo
|
|
# kubectl delete service -n infra loki tempo
|
|
# 正确的实例在 logging 和 tracing namespace 正常运行
|
|
|
|
## ========================================
|
|
## P1 - 高优先级(公共仓库镜像,建议缓存)
|
|
## ========================================
|
|
|
|
# Docker Hub - 官方镜像
|
|
docker.io/mysql:8.0
|
|
docker.io/mysql:latest
|
|
docker.io/postgres:16-alpine
|
|
docker.io/redis:7-alpine
|
|
docker.io/redis:7.2-alpine
|
|
docker.io/busybox:1.35
|
|
docker.io/busybox:latest
|
|
|
|
# Docker Hub - Bitnami 镜像
|
|
registry-1.docker.io/bitnami/postgresql:latest
|
|
registry-1.docker.io/bitnami/postgres-exporter:latest
|
|
registry-1.docker.io/bitnami/redis:latest
|
|
registry-1.docker.io/bitnami/redis-exporter:latest
|
|
|
|
# Quay.io - ArgoCD
|
|
quay.io/argoproj/argocd:v3.2.1
|
|
|
|
# Quay.io - Cert-Manager
|
|
quay.io/jetstack/cert-manager-controller:v1.13.3
|
|
quay.io/jetstack/cert-manager-cainjector:v1.13.3
|
|
quay.io/jetstack/cert-manager-webhook:v1.13.3
|
|
|
|
# Quay.io - MetalLB
|
|
quay.io/metallb/controller:v0.14.8
|
|
quay.io/metallb/speaker:v0.14.8
|
|
|
|
# GHCR - GitHub Container Registry
|
|
ghcr.io/dexidp/dex:v2.43.0
|
|
ghcr.io/external-secrets/external-secrets:v0.10.5
|
|
ghcr.io/kedacore/keda:2.18.3
|
|
ghcr.io/kedacore/keda-admission-webhooks:2.18.3
|
|
ghcr.io/kedacore/keda-metrics-apiserver:2.18.3
|
|
|
|
# AWS ECR
|
|
public.ecr.aws/docker/library/redis:8.2.2-alpine
|
|
|
|
# Docker Hub - Other
|
|
docker.io/gitea/act_runner:0.2.6
|
|
docker.io/langgenius/dify-plugin-daemon:0.3.3-local
|
|
docker.io/otel/opentelemetry-collector-k8s:0.141.0
|
|
docker.io/qqshfox/cert-manager-webhook-dnspod:latest
|
|
|
|
# Registry.k8s.io - Kubernetes 官方
|
|
registry.k8s.io/ingress-nginx/controller:v1.14.0
|
|
registry.k8s.io/defaultbackend-amd64:1.5
|
|
|
|
# Rancher 镜像
|
|
docker.io/rancher/klipper-lb:v0.4.13
|
|
docker.io/rancher/local-path-provisioner:v0.0.31
|
|
docker.io/rancher/mirrored-coredns-coredns:1.10.1
|
|
|
|
## ========================================
|
|
## P2 - 中优先级(已有部分缓存或已正常运行)
|
|
## ========================================
|
|
|
|
# Grafana 监控组件(logging 和 tracing namespace 中已正常运行)
|
|
# 建议缓存以备将来使用,但不紧急
|
|
docker.io/grafana/loki:2.6.1
|
|
docker.io/grafana/loki:latest
|
|
docker.io/grafana/tempo:2.9.0
|
|
docker.io/grafana/tempo:latest
|
|
docker.io/grafana/promtail:3.5.1
|
|
|
|
# Prometheus Stack - 部分已缓存到 harbor.omniverseai.net/library/
|
|
docker.io/prom/prometheus:latest
|
|
docker.io/prom/alertmanager:latest
|
|
docker.io/prom/mysqld-exporter:v0.15.1
|
|
docker.io/prom/node-exporter:v1.10.2
|
|
|
|
# Grafana - 已缓存
|
|
docker.io/grafana/grafana:latest
|
|
|
|
# MinIO
|
|
docker.io/minio/minio:latest
|
|
docker.io/minio/mc:latest
|
|
|
|
# Qdrant 向量数据库
|
|
docker.io/qdrant/qdrant:latest
|
|
|
|
## ========================================
|
|
## P3 - 低优先级(本地镜像,无需缓存)
|
|
## ========================================
|
|
|
|
# 以下是本地构建或已在 Harbor 的镜像,无需缓存:
|
|
# - pager-backend:latest
|
|
# - pager-frontend:latest
|
|
# - stock-backend:latest
|
|
# - stock-frontend:latest
|
|
# - ljwx-stock-backend:v1.0
|
|
# - ljwx-stock-frontend:v1.0
|
|
# - omniverse-website:latest
|
|
# - harbor.omniverseai.net/ljwx/*
|
|
# - harbor.omniverseai.net/library/*
|
|
# - harbor.eu.lingjingwanxiang.cn/*
|
|
|
|
## ========================================
|
|
## 快速修复命令
|
|
## ========================================
|
|
|
|
# 1. 删除重复部署(最优先)
|
|
kubectl delete statefulset -n infra loki tempo
|
|
kubectl delete service -n infra loki tempo
|
|
|
|
# 验证正确的实例运行正常
|
|
kubectl get pods -n logging -l app=loki
|
|
kubectl get pods -n tracing -l app.kubernetes.io/name=tempo
|
|
|
|
# 2. 批量缓存 P1 高优先级镜像(可选,提升性能)
|
|
cd /Users/brunogao/work/codes/tools/macos/k8s
|
|
./cache-image.sh -f images-to-cache-p1.txt
|
|
|
|
# 3. 使用新的修复脚本(推荐)
|
|
./fix-cluster-issues-v2.sh auto
|
|
|
|
## ========================================
|
|
## 注意事项
|
|
## ========================================
|
|
|
|
# 1. dev 命名空间的镜像拉取失败是因为镜像不存在于 Harbor,需要:
|
|
# - 检查 CI/CD 流程,确保镜像已构建
|
|
# - 或者删除这些失败的 Deployment:
|
|
# kubectl delete deployment -n dev backend frontend quality-dashboard
|
|
|
|
# 2. CrashLoopBackOff 的 Pods 需要单独排查应用日志:
|
|
# - external-secrets (配置问题)
|
|
# - ljwx-health/ljwx-boot (应用错误)
|
|
# - ljwx-project 前后端 (应用错误)
|
|
# - prometheus-adapter (配置问题)
|
|
|
|
# 3. 定期更新缓存镜像,建议每周执行一次:
|
|
# ./cache-morning-images.sh
|
|
|
|
# 4. infra namespace 中的 loki/tempo 是 17 小时前创建的重复部署:
|
|
# - logging namespace 的 loki-0 才是正确的(17天前部署)
|
|
# - tracing namespace 的 tempo-0 才是正确的(17天前部署)
|
|
# - 应该删除 infra namespace 中的重复资源
|