当前位置: 首页 > news >正文

Kubernetes-镜像加速篇-01-加速工具

[友情链接]加速三剑客
镜像加速:https://github.com/DaoCloud/public-image-mirror
二进制文件加速:https://github.com/DaoCloud/public-binary-files-mirror
Helm 加速:https://github.com/DaoCloud/public-helm-charts-mirror

二进制文件加速

使用方法

在原始 URL 上面加入 files.m.daocloud.io 的 前缀 就可以使用。比如:

# Helm 下载原始URL
wget https://get.helm.sh/helm-v3.9.1-linux-amd64.tar.gz# 加速后的 URL
wget https://files.m.daocloud.io/get.helm.sh/helm-v3.9.1-linux-amd64.tar.gz

安装 Helm

cd /tmp
export HELM_VERSION="v3.9.3"wget "https://files.m.daocloud.io/get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz"
tar -zxvf helm-${HELM_VERSION}-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/helm
helm version

安装 KIND

cd /tmp
export KIND_VERSION="v0.22.0"curl -Lo ./kind https://files.m.daocloud.io/github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64
chmod +x ./kind
mv ./kind /usr/bin/kind
kind version

安装 istio

cd /tmp
export ISTIO_VERSION="1.14.3"wget "https://files.m.daocloud.io/github.com/istio/istio/releases/download/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux-amd64.tar.gz"
tar -zxvf istio-${ISTIO_VERSION}-linux-amd64.tar.gz
# Do follow the istio docs to install istio

安装 nerdctl (代替 docker 工具)

export NERDCTL_VERSION="1.7.6"
mkdir -p nerdctl ;cd nerdctl
wget https://files.m.daocloud.io/github.com/containerd/nerdctl/releases/download/v${NERDCTL_VERSION}/nerdctl-full-${NERDCTL_VERSION}-linux-amd64.tar.gz
tar -zvxf nerdctl-full-${NERDCTL_VERSION}-linux-amd64.tar.gz
mkdir -p /opt/cni/bin ;cp -f libexec/cni/* /opt/cni/bin/ ;cp bin/* /usr/local/bin/ ;cp lib/systemd/system/*.service /usr/lib/systemd/system/
systemctl enable containerd ;systemctl start containerd --now
systemctl enable buildkit;systemctl start buildkit --now

docker镜像加速

使用方法

增加前缀 (推荐方式)。比如:

              docker.io/library/busybox|V
m.daocloud.io/docker.io/library/busybox

或者 支持的镜像仓库 的 前缀替换 就可以使用。比如:

           docker.io/library/busybox|V
docker.m.daocloud.io/library/busybox

通过 加速 安装 kubeadm

kubeadm config images pull --image-repository k8s-gcr.m.daocloud.io

通过 加速 安装 kind

kind create cluster --name kind --image m.daocloud.io/docker.io/kindest/node:v1.22.1

通过 加速 部署 应用(这里以 Ingress 为例)

wget -O image-filter.sh https://github.com/DaoCloud/public-image-mirror/raw/main/hack/image-filter.sh && chmod +x image-filter.shwget -O deploy.yaml https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/baremetal/deploy.yamlcat ./deploy.yaml | ./image-filter.sh | kubectl apply -f -

Docker 加速

添加到 /etc/docker/daemon.json

{"registry-mirrors": ["https://docker.m.daocloud.io"]
}

helm 加速

helm repo add community https://release.daocloud.io/chartrepo/community 
http://www.lryc.cn/news/480362.html

相关文章:

  • 字母的异位数
  • 达梦数据库DM Exception字符串截断错误,略坑~
  • vue实现图片无限滚动播放
  • python爬虫指南——初学者避坑篇
  • Vivado+Vscode联合打造verilog环境
  • Python 微服务架构
  • Android JNI 技术入门指南
  • 实在智能受邀出席柳州市智能终端及机器人产业发展合作大会
  • 算法求解(C#)-- 寻找包含目标字符串的最短子串算法
  • AscendC从入门到精通系列(二)基于Kernel直调开发AscendC算子
  • DAO模式的理解
  • 使用GitHub Actions实现CI/CD流程
  • 机器人助力Bridge Champ游戏:1.4.2版本如何提升玩家体验
  • 滑动窗口(单调队列维护窗口)-acwing
  • ALB搭建
  • c# 动态lambda实现二级过滤(支持多种参数类型和模糊查询)
  • 第J5周:DenseNet+SE-Net实战
  • Intern大模型训练营(五):书生大模型全链路开源体系笔记
  • 聚观早报 | 比亚迪腾势D9登陆泰国;苹果 iOS 18.2 将发布
  • 微信小程序开发,诗词鉴赏app,诗词搜索实现(三)
  • Kotlin 协程使用及其详解
  • 计算机组成原理--三章四章
  • 单片机工程使用链接优化-flto找不到定义_链接静态库
  • UniTask/Unity的PlayerLoopTiming触发顺序
  • 【报错记录】Steam迁移(移动)游戏报:移动以下应用的内容失败:XXX: 磁盘写入错误
  • C 语言学习-04【结构化程序设计】
  • 机器视觉:轮廓匹配算法原理
  • 动力商城-02 环境搭建
  • 【react】Redux基础用法
  • 使用Python分析股票价格数据并计算移动平均线的实用指南