Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple ASM cluster #1205

Closed
yugandhar-btc opened this issue Apr 8, 2022 · 4 comments
Closed

simple ASM cluster #1205

yugandhar-btc opened this issue Apr 8, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@yugandhar-btc
Copy link

yugandhar-btc commented Apr 8, 2022

Iam trying to create simple ASM cluster and my main.tf is below ,what i have done is , i just declarer variables in my main.tf , usually I think it should work, could you please help me what went wrong please?

image

ERROR:-

image

Terraform Configuration

module "asm" {
  source            = "terraform-google-modules/kubernetes-engine/google//modules/asm"
  channel           = "regular"
  multicluster_mode = "connected"
  enable_cni        = false

}

Terraform Version

Terraform v0.13.0

Additional information

No response

@yugandhar-btc yugandhar-btc added the bug Something isn't working label Apr 8, 2022
@apeabody apeabody self-assigned this Apr 8, 2022
@apeabody
Copy link
Collaborator

apeabody commented Apr 8, 2022

Hi @yugandhar-btc thanks for the report. I believe that the function anytrue requires Terraform v0.14 or later, and it appears from above you are using Terraform v0.13.0.

Could you please re-try with Terraform v0.14 or later, and if it is still failing provide an updated example?

@yugandhar-btc
Copy link
Author

@apeabody Thank you!! So much.. and tf plan is successfully initialized

But while iam applying the tf apply i cloud see below error, could you please help with this? thanks in advance!!!

module.asm.kubernetes_namespace.system: Creating...
Error: Post "http://localhost/api/v1/namespaces": dial tcp [::1]:80: connect: connection refused

on .terraform/modules/asm/modules/asm/main.tf line 34, in resource "kubernetes_namespace" "system":
34: resource "kubernetes_namespace" "system" {

@apeabody
Copy link
Collaborator

apeabody commented Apr 8, 2022

Hi @yugandhar-btc

I suspect the underlying kubernetes provider maybe defaulting to localhost as noted in your error. I've opened #1208 to investigate.

If you are attempting to use with an existing GKE cluster, you might try adding the following with the correct values for your GKE cluster:

data "google_client_config" "default" {}

provider "kubernetes" {
  host                   = "https://${module.gke.endpoint}"
  token                  = data.google_client_config.default.access_token
  cluster_ca_certificate = base64decode(module.gke.ca_certificate)
}

Alternatively you might want to look at this example which creates a GKE cluster with ASM.

@apeabody apeabody added the triaged Scoped and ready for work label Apr 13, 2022
@apeabody apeabody removed the triaged Scoped and ready for work label Jul 29, 2022
@apeabody
Copy link
Collaborator

Hi @yugandhar-btc - The documentation has been updated to include the required Kubernetes provider configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants