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

Kubernetes provider for 1.20 upgrade #3392

Closed
vijay-veeranki opened this issue Dec 1, 2021 · 1 comment
Closed

Kubernetes provider for 1.20 upgrade #3392

vijay-veeranki opened this issue Dec 1, 2021 · 1 comment
Assignees

Comments

@vijay-veeranki
Copy link
Contributor

Using the latest Kubernetes provider having issues

terraform-aws-modules/terraform-aws-eks#1280 (comment)

The suggestion above is to upgrade to terraform 1.0, but that is a separate epic to upgrade to terraform 1.0

The current Kubernetes provider version is 1.11, but that is not working for the 1.20 upgrade, find the right version for the 1.20 upgrade, which runs without any issues.

@vijay-veeranki
Copy link
Contributor Author

Applied in this PR

ministryofjustice/cloud-platform-infrastructure#1433

Upgrade k8's provider to version = "~> 2.6.1", this is a pre-requisite for K8s 1.20 upgrade.

https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/guides/v2-upgrade-guide#changes-in-v200

The load_config_file attribute has been removed.
Support for the KUBECONFIG environment variable has been dropped. (Use KUBE_CONFIG_PATH or KUBE_CONFIG_PATHS instead).
The config_path attribute will no longer default to ~/.kube/config.
If KUBE_CONFIG_PATH is set, it is ignoring below, so we need to unset KUBE_CONFIG_PATH, unless we want to set config_path

  host                   = data.aws_eks_cluster.cluster.endpoint
  cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
  token                  = data.aws_eks_cluster_auth.cluster.token

Used exec as to avoid token expire during long-running applies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant