ks-installer icon indicating copy to clipboard operation
ks-installer copied to clipboard

kubekey部署问题

Open dd01panqinglong opened this issue 3 years ago • 1 comments

怎么一键化部署kubesphere的,其中在ks-installer中,只看到了start启动命令,并没有看到如何调用ansible脚本的一些命令,请问是如何实现通过kubekey 一键部署kubesphere的,shell-operator start这个指令

dd01panqinglong avatar Jun 26 '21 03:06 dd01panqinglong

最近刚好大概看来ks-installer 大概理解 1, 基于https://github.com/flant/shell-operator 框架,注册监听:ClusterConfiguration add/update事件

$ python controller/installRunner.py --config

{
	"onKubernetesEvent": [{
		"name": "Monitor clusterconfiguration",
		"kind": "ClusterConfiguration",
		"event": [ "add", "update" ],
		"objectName": "ks-installer",
		"namespaceSelector": {
			"matchNames": ["kubesphere-system"]
		},
		"jqFilter": ".spec",
		"allowFailure": false
	}]
}

2,收到事件后执行脚本: python installRunner.py 脚本使用kube api拿到cluster_configuration,后面就是类似controller 逻辑,只是执行ansible脚本

lshmouse avatar Jun 30 '21 14:06 lshmouse