156 lines
4.7 KiB
Plaintext
156 lines
4.7 KiB
Plaintext
# Kubernetes 集群镜像缓存优先级列表
|
|
# 生成时间: 2026-01-04
|
|
# 用途: 缓存公共仓库镜像到本地 Harbor,解决拉取超时问题
|
|
|
|
## ========================================
|
|
## P0 - 紧急修复(当前拉取失败的镜像)
|
|
## ========================================
|
|
|
|
# Grafana 监控组件(Docker Hub 拉取超时)
|
|
grafana/loki:latest
|
|
grafana/loki:2.6.1
|
|
grafana/tempo:latest
|
|
grafana/tempo:2.9.0
|
|
grafana/promtail:3.5.1
|
|
|
|
# 开发环境镜像(Harbor 仓库不存在)
|
|
# 注意: 这些镜像需要先构建并推送到 Harbor,不是拉取问题
|
|
# harbor.omniverseai.net/ljwx/backend-template:dev
|
|
# harbor.omniverseai.net/ljwx/frontend-dashboard:dev
|
|
# harbor.omniverseai.net/ljwx/quality-dashboard:dev
|
|
|
|
## ========================================
|
|
## 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 - 中优先级(已有部分缓存,但应补全)
|
|
## ========================================
|
|
|
|
# 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/*
|
|
|
|
## ========================================
|
|
## 快速修复命令
|
|
## ========================================
|
|
|
|
# 修复 P0 问题(Grafana 组件)
|
|
cd /Users/brunogao/work/codes/tools/macos/k8s
|
|
|
|
# 1. 缓存 Loki 镜像并更新 Deployment
|
|
./cache-image.sh grafana/loki:latest
|
|
./cache-image.sh grafana/loki:2.6.1
|
|
kubectl delete pod -n infra loki-0
|
|
kubectl delete pod -n logging loki-0
|
|
|
|
# 2. 缓存 Tempo 镜像并更新 Deployment
|
|
./cache-image.sh grafana/tempo:latest
|
|
./cache-image.sh grafana/tempo:2.9.0
|
|
kubectl delete pod -n infra tempo-0
|
|
kubectl delete pod -n tracing tempo-0
|
|
|
|
# 3. 缓存 Promtail 镜像
|
|
./cache-image.sh grafana/promtail:3.5.1
|
|
|
|
# 批量缓存 P1 高优先级镜像
|
|
./cache-image.sh -f images-to-cache-priority-p1.txt
|
|
|
|
## ========================================
|
|
## 注意事项
|
|
## ========================================
|
|
|
|
# 1. dev 命名空间的镜像拉取失败是因为镜像不存在于 Harbor,需要先构建:
|
|
# - 检查 CI/CD 流程,确保镜像已构建
|
|
# - 或者删除这些失败的 Deployment
|
|
|
|
# 2. CrashLoopBackOff 的 Pods 需要单独排查应用日志:
|
|
# - external-secrets (配置问题)
|
|
# - ljwx-health/ljwx-boot (应用错误)
|
|
# - ljwx-project 前后端 (应用错误)
|
|
# - prometheus-adapter (配置问题)
|
|
|
|
# 3. 定期更新缓存镜像,建议每周执行一次:
|
|
# ./cache-morning-images.sh
|