terraform-google-kubernetes-engine icon indicating copy to clipboard operation
terraform-google-kubernetes-engine copied to clipboard

Using this module I am unable to authenticate to the gke private cluster

Open Rajchirag1993 opened this issue 3 years ago • 3 comments

TL;DR

Hello,

I am using this module to authenticate to gke private cluster but I am facing i/o timeout error.

Can you please guide me what is missing ??/

Expected behavior

I am trying to deploy kubernetes resources through terraform

Observed behavior

module.terraform-google-kubernetes-engine.kubernetes_namespace.my-first-namespace: Creating... module.terraform-google-kubernetes-engine.kubernetes_namespace.my-first-namespace: Still creating... [10s elapsed] module.terraform-google-kubernetes-engine.kubernetes_namespace.my-first-namespace: Still creating... [20s elapsed] module.terraform-google-kubernetes-engine.kubernetes_namespace.my-first-namespace: Still creating... [30s elapsed] ╷ │ Error: Post "http://X.X.X.X:443/api/v1/namespaces": dial tcp X.X.X.X:443: i/o timeout │ │ with module.terraform-google-kubernetes-engine.kubernetes_namespace.my-first-namespace, │ on .terraform/modules/terraform-google-kubernetes-engine/manifests.tf line 27, in resource "kubernetes_namespace" "my-first-namespace": │ 27: resource "kubernetes_namespace" "my-first-namespace" { │

Terraform Configuration

Basic kubernetes private cluster configuration

Terraform Version

Terraform v1.0.11

Additional information

No response

Rajchirag1993 avatar Oct 04 '22 10:10 Rajchirag1993

I dont see your configuration for the module but are you using this option?

deploy_using_private_endpoint

richiefrich avatar Oct 05 '22 04:10 richiefrich

+1 to @richiefrich, sample config would help us understand the reason. If it is using private endpoint, you will need direct network connectivity to the apiserver IP.

bharathkkb avatar Oct 06 '22 18:10 bharathkkb

Hello Stephen,

I am using the same template of your module, getting connection refused and connection timed out errors.

Yes you are correct I am using private cluster configuration which includes

  1. master authorised networks
  2. private endpoint
  3. private nodes
  4. network policy

Please let me know how to authenticate to gke private cluster from terraform to spin up kubernetes resources like deployment and services.

On Wed, 5 Oct 2022 at 10:17 AM, Stephen M Christman < @.***> wrote:

I dont see your configuration for the module but are you using this option?

deploy_using_private_endpoint

— Reply to this email directly, view it on GitHub https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/1417#issuecomment-1267935545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOCGZ5XUMEBIDJ6MDOYIS4LWBUB7FANCNFSM6AAAAAAQ4OIU7I . You are receiving this because you authored the thread.Message ID: <terraform-google-modules/terraform-google-kubernetes-engine/issues/1417/1267935545 @github.com>

Rajchirag1993 avatar Oct 15 '22 08:10 Rajchirag1993

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Dec 14 '22 23:12 github-actions[bot]