当前位置:网站首页>使用Karmada实现Helm应用的跨集群部署
使用Karmada实现Helm应用的跨集群部署
2022-06-28 15:46:00 【InfoQ】
背景
部署Karmada
部署Flux
kubectl apply -k github.com/fluxcd/flux2/manifests/crds?ref=main --kubeconfig ~/.kube/karmada.configflux install --kubeconfig ~/.kube/members.config --context member1
flux install --kubeconfig ~/.kube/members.config --context member2Helm release分发
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: podinfo
spec:
interval: 1m
url: https://stefanprodan.github.io/podinfo apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: podinfo
spec:
interval: 5m
chart:
spec:
chart: podinfo
version: 5.0.3
sourceRef:
kind: HelmRepository
name: podinfoapiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
name: helm-repo
spec:
resourceSelectors:
- apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
name: podinfo
placement:
clusterAffinity:
clusterNames:
- member1
- member2apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
name: helm-release
spec:
resourceSelectors:
- apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
name: podinfo
placement:
clusterAffinity:
clusterNames:
- member1
- member2kubectl apply -f ../helm/ --kubeconfig ~/.kube/karmada.confighelmrelease.helm.toolkit.fluxcd.io/podinfo created
helmrepository.source.toolkit.fluxcd.io/podinfo created
propagationpolicy.policy.karmada.io/helm-release created
propagationpolicy.policy.karmada.io/helm-repo createdhelm --kubeconfig ~/.kube/members.config --kube-context member1 list
为特定集群定制 Helm 应用
apiVersion: policy.karmada.io/v1alpha1
kind: OverridePolicy
metadata:
name: example-override
namespace: default
spec:
resourceSelectors:
- apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
name: podinfo
overrideRules:
- targetCluster:
clusterNames:
- member1
overriders:
plaintext:
- path: "/spec/values"
operator: add
value:
replicaCount: 2kubectl apply -f example-override.yaml --kubeconfig ~/.kube/karmada.configoverridepolicy.policy.karmada.io/example-override createdkubectl --kubeconfig ~/.kube/members.config --context member1 get poNAME READY STATUS RESTARTS AGE
podinfo-68979685bc-6wz6s 1/1 Running 0 6m28s
podinfo-68979685bc-dz9f6 1/1 Running 0 7m42s参考文档:
边栏推荐
- 请问下大家有遇到过这种设置的主健和数据库一致的错误吗?
- Qt create 5.0.3 配置Qt4.8.7
- Talking about open source - Linus and Jim talk about open source in China
- Navicat 15 for MySQL
- Practice of curve replacing CEPH in Netease cloud music
- A little hesitant in the morning
- Qt5.5.1配置MSVC2010编绎器和windbg调试器
- 深度学习基础汇总
- openGauss内核:SQL解析过程分析
- SaaS application management platform solution in the education industry: help enterprises realize the integration of operation and management
猜你喜欢

Lecturer solicitation order | Apache dolphin scheduler meetup sharing guests, looking forward to your topic and voice!

Xinchuang operating system -- kylin kylin desktop operating system (project 10 security center)

Fleet | background Discovery issue 3: Status Management

Visual Studio 2019软件安装包和安装教程

QT create 5.0.3 configuring qt4.8.7

全球陆续拥抱Web3.0,多国已明确开始抢占先机

隐私计算 FATE - 离线预测

Complete model training routine (I)

开源大咖说 - Linus 与 Jim 对话中国开源

Azure Kinect微软摄像头Unity开发小结
随机推荐
抖音实战~我关注的博主列表、关注、取关
PostgreSQL enables grouping statistics by year, month, day, week, hour, minute and second
5 minutes to make a bouncing ball game
成功迁移到云端需要采取的步骤
【推荐系统】多任务学习之ESMM模型(更新ing)
Qt 界面库
NAACL 2022 | 机器翻译SOTA模型的蒸馏
Visual Studio 2010 configuring and using qt5.6.3
ROS knowledge points - ROS create workspace
The world has embraced Web3.0 one after another, and many countries have clearly begun to seize the initiative
Ffmpeg forbidden output banner log (30)
部门新来了个字节25K出来的,让我见识到了什么是天花板
超自动化与网络安全的未来
Big God explains open source buff gain strategy live lecture
Technical secrets of ByteDance data platform: implementation and optimization of complex query based on Clickhouse
Flutter简单实现多语言国际化
SaaS application management platform solution in the education industry: help enterprises realize the integration of operation and management
大神详解开源 BUFF 增益攻略丨直播讲座
What useful supplier management systems are available
Sample explanation of batch inserting data using MySQL bulkloader