I am getting the below error where i creating the kubernetes cluster on AWS below are the files and code I am using.
我在AWS上创建kubernetes集群时出现了以下错误。下面是我正在使用的文件和代码。
"clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "system:anonymous" cannot create resource "clusterrolebindings" in API group "rbac.authorization.k8s.io" at the cluster scope"
“禁止使用clusterrolebindings.rbac.authorization.k8s.io:用户”system:nonymous“无法在群集作用域的API组”rbac.authoriization.k8s.io“中创建资源”clusterrolebndings“”
I checked the solution, mostly it like a permission issue for the user but I checked my user has Administrator Access on AWS.
我检查了解决方案,主要是用户的权限问题,但我检查了我的用户在AWS上是否具有管理员访问权限。
provider "aws" {
region = var.region
}
provider "kubernetes" {
host = module.eks.cluster_endpoint
cluster_ca_certificate = base64decode(module.eks.cluster_certificate_authority_data)
}
data "aws_availability_zones" "available" {}
locals {
cluster_name = "demo-eks-${random_string.suffix.result}"
}
resource "random_string" "suffix" {
length = 8
special = false
}
resource "kubernetes_cluster_role_binding" "example" {
metadata {
name = "fabric8-rbac"
}
role_ref {
api_group = "rbac.authorization.k8s.io"
kind = "ClusterRole"
name = "cluster-admin"
}
subject {
kind = "ServiceAccount"
name = "default"
namespace = "default"
}
}
I checked the solution, mostly it like a permission issue for the user but I checked my user has Administrator Access on AWS.
我检查了解决方案,主要是用户的权限问题,但我检查了我的用户在AWS上是否具有管理员访问权限。
更多回答
优秀答案推荐
我是一名优秀的程序员,十分优秀!