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 “用户”;“客户”;无法在命名空间“中创建ReplicationController”;“违约”;_Kubernetes_Google Cloud Platform_Terraform_Google Kubernetes Engine - Fatal编程技术网

Kubernetes “用户”;“客户”;无法在命名空间“中创建ReplicationController”;“违约”;

Kubernetes “用户”;“客户”;无法在命名空间“中创建ReplicationController”;“违约”;,kubernetes,google-cloud-platform,terraform,google-kubernetes-engine,Kubernetes,Google Cloud Platform,Terraform,Google Kubernetes Engine,在尝试使用terraform在GKE中的群集上创建复制控制器时,出现以下错误: kubernetes_replication_controller.k8_pod: Failed to create replication controller: replicationcontrollers is forbidden: User "client" cannot create replicationcontrollers in the namespace "default" 我已经配置了kubec

在尝试使用terraform在GKE中的群集上创建复制控制器时,出现以下错误:

kubernetes_replication_controller.k8_pod: Failed to create replication controller: replicationcontrollers is forbidden: User "client" cannot create replicationcontrollers in the namespace "default"
我已经配置了
kubectl
,并通过在谷歌kubernetes引擎上创建pods/复制控制器对其进行了测试。我也尝试过使用
gcloud config unset container/use_client_certificate

资源调配代码示例如下所示:

resource "kubernetes_replication_controller" "k8_pod" {
    metadata {
        name = "testing-deployment"
        labels {
            App = "wassup"
        }
    }

    spec {
        selector {
            App = "wassup"
        }

        template {
            container {
                image = "image/name/here"
                name  = "testing-deployment"

                port {
                    container_port = 8080
                }
            }
        }
    }
}

看起来需要赋予用户“客户端”创建复制控制器的角色-请您再详细说明一下好吗?我正在使用创建群集并设置此配置。我试图避免任何手动步骤。理想情况下,
terraform应用“tfplan”
应根据需要配置资源。该“客户端”用户是terraform尝试使用以创建复制控制器的帐户。这可能是一个terraform bug,看起来非常类似于我假设这是全部错误,并且你不会得到像这样的“未知用户”