当前位置:网站首页>使用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参考文档:
边栏推荐
- 【高并发基础】MySQL 不同事务隔离级别下的并发隐患及解决方案
- Gbase Nantah General Motors appears at the 6th World Intelligence Conference
- The Web3.0 era is coming. See how Tianyi cloud storage resources invigorate the system to enable new infrastructure (Part 1)
- Web worker poll request
- 抖音实战~我关注的博主列表、关注、取关
- What are the most powerful small and medium-sized companies in Beijing?
- Gartner发布当前至2024年的五大隐私趋势
- 【Spock】处理 Non-ASCII characters in an identifier
- A new 25K byte from the Department showed me what the ceiling is
- 10年测试经验,在35岁的生理年龄面前,一文不值
猜你喜欢

Talking about open source - Linus and Jim talk about open source in China

物联网云融合安全指南

No win32/com in vs2013 help document

Web3.0时代来了,看天翼云存储资源盘活系统如何赋能新基建(上)

抖音实战~我关注的博主列表、关注、取关

SaaS application management platform solution in the education industry: help enterprises realize the integration of operation and management

薅羊毛的机会了,点个“赚”即有机会赚取高额佣金

C语言基础语法

Flutter简单实现多语言国际化

Grand launch of qodana: your favorite CI code quality platform
随机推荐
10年测试经验,在35岁的生理年龄面前,一文不值
Notes to distributed theory
抖音实战~我关注的博主列表、关注、取关
Solution to JSON parsing problem using curl for Tron API signature broadcast and json Problem record of the loads method
软件测试员的悲哀竟是...自己的技术能力不能满足大厂要求?
Xinchuang operating system -- kylin kylin desktop operating system (project 10 security center)
Visual Studio 2010 编绎Qt5.6.3
Fleet |「后台探秘」第 3 期:状态管理
Qt5.5.1 configuring msvc2010 compiler and WinDbg debugger
R language ggplot2 visualization: use the patchwork package (directly use the plus sign +) to horizontally combine the two ggplot2 visualization results to form a single visualization result graph
关于针对tron API签名广播时使用curl的json解析问题解决方案及针对json.loads方法的问题记录
请问下大家有遇到过这种设置的主健和数据库一致的错误吗?
Introduction to deep learning in machine learning
超自动化与网络安全的未来
开源大咖说 - Linus 与 Jim 对话中国开源
among us私服搭建
机器学习之深度学习简介
A new 25K byte from the Department showed me what the ceiling is
如何查询数据库中一个表中的所有数据呢?
Jenkins的安装及使用