Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
获得;Kubernetes错误:未经授权;尝试使用Kubernetes配置GitLab CI Runner时_Kubernetes_Google Cloud Platform_Gitlab_Gitlab Ci_Kubernetes Helm - Fatal编程技术网

获得;Kubernetes错误:未经授权;尝试使用Kubernetes配置GitLab CI Runner时

获得;Kubernetes错误:未经授权;尝试使用Kubernetes配置GitLab CI Runner时,kubernetes,google-cloud-platform,gitlab,gitlab-ci,kubernetes-helm,Kubernetes,Google Cloud Platform,Gitlab,Gitlab Ci,Kubernetes Helm,接下来,我尝试在GCP上使用Kubernetes为私有GitLab实例运行GitLab CI 我通过kubectl集群信息 然后我用kubectl创建了ServiceAccount,并用命令kubectl descripe secret/ServiceAccount-XXXXX 然后我拿到了证书 kubectl-o json get secret services account-XXXXX | jq-r'.data.“ca.crt”| base64-d-| tee ca.crt 我在GitLa

接下来,我尝试在GCP上使用Kubernetes为私有GitLab实例运行GitLab CI

我通过
kubectl集群信息

然后我用kubectl创建了ServiceAccount,并用命令
kubectl descripe secret/ServiceAccount-XXXXX

然后我拿到了证书

kubectl-o json get secret services account-XXXXX | jq-r'.data.“ca.crt”| base64-d-| tee ca.crt

我在GitLab的“添加现有Kubernetes集群”命令的Kubernetes集成字段中插入了IP、令牌和ca.crt内容

之后,我尝试在GitLab安装Helm,但出现了一个错误

Something went wrong while installing Helm Tiller
Kubernetes error: Unauthorized

你能帮我找出解决这些问题的方法吗

gitlab CI不是100%,但如果它是在集群内构建的,那么可能

默认情况下,GKE上启用了RBAC,因此您可能需要为Gitlab设置群集角色权限,以便它可以启动容器。

您可以尝试将
--v=10
添加到
kubectl
命令以获得更多调试输出。此错误消息很常见,指向身份验证/授权问题,但您需要知道哪些操作不允许执行。特别是Tiller需要广泛的权限来修改集群上的几乎所有资源。