相关疑难解决方法(0)

Terraform:错误:Kubernetes 集群无法访问:配置无效

使用“terraform destroy”删除 kubernetes 集群后,我无法再创建它了。

“terraform apply”返回以下错误消息:

错误:Kubernetes 集群无法访问:无效配置:未提供任何配置,请尝试设置 KUBERNETES_MASTER 环境变量

这是地形配置:

terraform {
  backend "s3" {
    bucket = "skyglass-msur"
    key    = "terraform/backend"
    region = "us-east-1"
  }
}

locals {
  env_name         = "staging"
  aws_region       = "us-east-1"
  k8s_cluster_name = "ms-cluster"
}

variable "mysql_password" {
  type        = string
  description = "Expected to be retrieved from environment variable TF_VAR_mysql_password"
}

provider "aws" {
  region = local.aws_region
}

data "aws_eks_cluster" "msur" {
  name = module.aws-kubernetes-cluster.eks_cluster_id
}

module "aws-network" {
  source = "github.com/skyglass-microservices/module-aws-network"

  env_name              = local.env_name …
Run Code Online (Sandbox Code Playgroud)

kubernetes terraform terraform-provider-aws amazon-eks

5
推荐指数
2
解决办法
3271
查看次数