Skip to content

kuberhealthy installation uses outdated cluster URL #207

@eickler

Description

@eickler

Summary

When creating a new EKS cluster from scratch with terraform, kuberhealthy is installed with the cluster URL from the previous run of terraform.

Steps to reproduce the behavior

terraform apply
# Clean up ELB
terraform destroy
# Check if everything is cleaned up
terraform apply

Expected behavior

Cluster is created and kuberhealthy is installed.

Actual behavior

Error: Kubernetes cluster unreachable: Get https://<old url>.gr7.us-east-1.eks.amazonaws.com/version?timeout=32s: dial tcp: lookup <old url>.gr7.us-east-1.eks.amazonaws.com on [2a02:908:2:a::1]:53: no such host

  on .terraform/modules/eks-jx.health.jx-health/main.tf line 1, in resource "helm_release" "kuberhealthy":
   1: resource "helm_release" "kuberhealthy" {

where <old url> is the cluster URL of the previous run. Note that kubeconfig is correctly updated with the new cluster when terraform aborts with the error message.

Maybe there is a missing dependency or race condition. The terraform log shows first

module.eks-jx.module.health.module.jx-health[0].helm_release.kuberhealthy: Creating...

and then much later

module.eks-jx.module.cluster.module.eks.local_file.kubeconfig[0]: Creating...
module.eks-jx.module.cluster.module.eks.local_file.kubeconfig[0]: Creation complete after 0s [id=294be563e46ce5a5d60a5d34b2737b7c55791cda]

Terraform version

The output of terraform version is:

Terraform v0.13.5

Module version

1.11.0

Operating system

MacOS

Metadata

Metadata

Assignees

No one assigned

    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