k8s部署jenkins主从
时间: 2023-09-10 17:10:21 浏览: 123
要在Kubernetes中部署Jenkins主从,你可以按照以下步骤进行操作:
1. 首先,创建一个ServiceAccount并进行RBAC授权,允许Jenkins访问Kubernetes集群的所有资源。你可以使用以下命令创建一个ServiceAccount并进行授权:
```
kubectl create sa jenkins-k8s-sa -n jenkins-k8s
kubectl create clusterrolebinding jenkins-k8s-sa-cluster -n jenkins-k8s --clusterrole=cluster-admin --serviceaccount=jenkins-k8s:jenkins-k8s-sa
```
<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [k8s学习之jenkins主从部署-pipeline](https://blog.csdn.net/weixin_60092693/article/details/122892562)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文