Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
容器镜像库
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
691fb4a7
未验证
提交
691fb4a7
编辑于
1 year ago
作者:
Romuald Atchadé
提交者:
GitLab
1 year ago
浏览文件
操作
下载
补丁
差异文件
Update GitLab Runner installation tutorial on GKE
上级
74c9f0b5
No related branches found
No related tags found
无相关合并请求
变更
1
隐藏空白变更内容
行内
左右并排
显示
1 个更改的文件
doc/tutorials/configure_gitlab_runner_to_use_gke/index.md
+82
-9
82 个添加, 9 个删除
doc/tutorials/configure_gitlab_runner_to_use_gke/index.md
有
82 个添加
和
9 个删除
doc/tutorials/configure_gitlab_runner_to_use_gke/index.md
+
82
−
9
浏览文件 @
691fb4a7
...
...
@@ -71,7 +71,7 @@ This step describes how to create a cluster and connect to it. After you connect
Now that you have a cluster, you're ready to install and configure the Kubernetes Operator.
1.
Install
the prerequisites
:
1.
Install
`cert-manager`
. Skip this step if you already have a certificate manager installed
:
```
shell
kubectl apply
-f
https://github.com/jetstack/cert-manager/releases/download/v1.7.1/cert-manager.yaml
...
...
@@ -85,19 +85,92 @@ Now that you have a cluster, you're ready to install and configure the Kubernete
| bash
-s
v0.24.0
```
1.
Install the Kubernetes Operator Catalog:
```
shell
kubectl create
-f
https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/crds.yaml
kubectl create
-f
https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/olm.yaml
```
1.
Install the Kubernetes Operator:
```
shell
kubectl create
-f
https://operatorhub.io/install/gitlab-runner-operator.yaml
```
1.
Operator Lifecycle Manager v0.25.0 and later only. Add your own certificate manager or use
`cert-manager`
.
-
To add your own certificate provider:
1. In the `gitlab-runner-operator.yaml`, define the certificate namespace and certificate name in the `env` setting:
```shell
cat > gitlab-runner-operator.yaml << EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: gitlab-runner-operator
namespace: gitlab-ns
spec:
channel: stable
name: gitlab-runner-operator
source: operatorhubio-catalog
ca: webhook-server-cert
sourceNamespace: olm
config:
env:
- name: CERTIFICATE_NAMESPACE
value: cert_namespace_desired_value
- name: CERTIFICATE_NAME
value: cert_name_desired_value
EOF
```
1. Apply the `gitlab-runner-operator.yaml` to the Kubernetes cluster:
```shell
kubectl apply -f gitlab-runner-operator.yaml
```
-
To use the
`cert-manager`
:
1. Use the `certificate-issuer-install.yaml` to install a `Certificate` and `Issuer` in the default namespace, in addition
to the operator installation:
```shell
cat > certificate-issuer-install.yaml << EOF
apiVersion: v1
kind: Namespace
metadata:
labels:
app.kubernetes.io/component: controller-manager
app.kubernetes.io/managed-by: olm
app.kubernetes.io/name: gitlab-runner-operator
name: gitlab-runner-system
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: gitlab-runner-serving-cert
namespace: gitlab-runner-system
spec:
dnsNames:
- gitlab-runner-webhook-service.gitlab-runner-system.svc
- gitlab-runner-webhook-service.gitlab-runner-system.svc.cluster.local
issuerRef:
kind: Issuer
name: gitlab-runner-selfsigned-issuer
secretName: webhook-server-cert
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: gitlab-runner-selfsigned-issuer
namespace: gitlab-runner-system
spec:
selfSigned: {}
EOF
```
1. Apply the `certificate-issuer-install.yaml` to the Kubernetes cluster:
```shell
kubectl create -f certificate-issuer-install.yaml
```
1.
Create a secret that contains the
`runner-registration-token`
from your
GitLab project:
...
...
@@ -109,7 +182,7 @@ Now that you have a cluster, you're ready to install and configure the Kubernete
name: gitlab-runner-secret
type: Opaque
stringData:
runner-
registration-
token: YOUR_RUNNER_
REGISTR
ATION_TOKEN
runner-token: YOUR_RUNNER_
AUTHENTIC
ATION_TOKEN
EOF
```
...
...
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录