Skip to content

tunnel_kubernetes doesnt honor the exec block #98

@the-mentor

Description

@the-mentor

It seems like when I use the code to connect to kubernetes.

ephemeral "tunnel_kubernetes" "service" {
  service_name = "service"
  namespace    = "testns"
  target_port  = 3000
  kubernetes = {
    host                   = module.kubeconfig.cluster_endpoint
    cluster_ca_certificate = module.kubeconfig.b64_ca_data
    exec = {
      api_version = module.kubeconfig.eks_exec.api_version
      command     = module.kubeconfig.eks_exec.command
      args        = module.kubeconfig.eks_exec.args
    }
  }
}

here is an example of the args info

args = {
      + api_version = "client.authentication.k8s.io/v1"
      + args        = [
          + "eks",
          + "get-token",
          + "--cluster-name",
          + "eks-cluster",
          + "--output",
          + "json",
          + "--profile",
          + "testprofile",
          + "--region",
          + "us-east-1",
        ]
      + command     = "aws"
    }

When I use the config_path and config_context similar to this it works

  kubernetes = {
    config_path    = "~/.kube/config"
    config_context = "minikube"
  }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions