惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
博客园 - 聂微东
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
MongoDB | Blog
MongoDB | Blog
B
Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
Martin Fowler
Martin Fowler
M
MIT News - Artificial intelligence
The GitHub Blog
The GitHub Blog
博客园_首页
博客园 - 叶小钗
腾讯CDC
G
Google Developers Blog
Blog — PlanetScale
Blog — PlanetScale
宝玉的分享
宝玉的分享
D
Docker

mafeifan 的编程技术分享

mafengwo-mp3-downloader | mafeifan 的编程技术分享 示例页面 | mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 查看 default namespace 下的 default service account名称 mafeifan 的编程技术分享 检查日志 | mafeifan 的编程技术分享 bridge fdb show dev flannel.1 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享
mafeifan 的编程技术分享
2026-01-16 · via mafeifan 的编程技术分享

众所周知的原因,docker.com,docker.io 地址被屏蔽了,导致国内无法直接拉取docker hub官方镜像,为了长远考虑,最好都替换为自己的私有仓库地址。 更退一步,替换为国内可用的镜像地址。

对于Kubersphere来说。替换分为几个方面:

第一步

kubectl -n kubesphere-system patch cc ks-installer -p '{"spec":{"local_registry":"registry.cn-beijing.aliyuncs.com"}}' --type=merge

基本能替换 kubesphere-system 命名空间的镜像

对于 kubesphere-monitoring-system 由于Kubersphere整合了开源的prometheus-operator,直接改deployment或stateful的image是不生效的, 要改CRD,原因这个配置项应该是PrometheusOperator在控制,具体可以参考文档看看 api-reference

修改 prometheus 用到的镜像地址

bash

kubectl edit prometheus -n kubesphere-monitoring-system k8s

# 修改image部分
# 注意版本,替换为正在使用的

  containers:
    - image: 'registry.cn-beijing.aliyuncs.com/kubesphereio/prometheus:v2.39.1'
      name: prometheus
    - image: >-
        registry.cn-beijing.aliyuncs.com/kubesphereio/prometheus-config-reloader:v0.55.1
      name: config-reloader
  evaluationInterval: 1m
  image: 'registry.cn-beijing.aliyuncs.com/kubesphereio/prometheus:v2.39.1'
  initContainers:
    - image: >-
        registry.cn-beijing.aliyuncs.com/kubesphereio/prometheus-config-reloader:v0.55.1
      name: init-config-reloader

直接在界面里编辑也可以

同样的,修改 alertmanager 用到的镜像地址

bash

kubectl edit alertmanager -n kubesphere-monitoring-system main

  containers:
    - image: 'registry.cn-beijing.aliyuncs.com/kubesphereio/alertmanager:v0.23.0'
      name: alertmanager
    - image: >-
        registry.cn-beijing.aliyuncs.com/kubesphereio/prometheus-config-reloader:v0.55.1
      name: config-reloader
  image: 'registry.cn-beijing.aliyuncs.com/kubesphereio/alertmanager:v0.23.0'

参考 ​

https://ask.kubesphere.io/forum/d/23693-prometheus-k8s-zhe-ge-statefulset-zhong-de-init-config-reloader-jing-xiang-di-zhi-ru-he-xiu-gai

https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.Prometheus