# AWS EKS: Failure deploying the ALB and service account for the Ingress Controller

**URL:** <https://discuss.hashicorp.com/t/aws-eks-failure-deploying-the-alb-and-service-account-for-the-ingress-controller/58214>\
**Category:** Kubernetes\
**Tags:** hcp-terraform\
**Created:** [September 13, 2023, 7:19pm UTC](https://discuss.hashicorp.com/t/aws-eks-failure-deploying-the-alb-and-service-account-for-the-ingress-controller/58214 "2023-09-13T19:19:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rwtamCaltech](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/rwtamcaltech/32/37903_2.png) [@rwtamCaltech](https://discuss.hashicorp.com/u/rwtamCaltech)\
**Post date:** [September 13, 2023, 7:19pm UTC](https://discuss.hashicorp.com/t/aws-eks-failure-deploying-the-alb-and-service-account-for-the-ingress-controller/58214/1 "2023-09-13T19:19:49Z")

</div>

Hello,

I am following a tutorial that uses Terraform to deploy EKS resources, including pods on AWS Fargate. The tutorial deploys a webapp for the 2048 game ([https://play2048.co/](https://play2048.co/)) that we can access as an endpoint within the cluster. The tutorial was written in February 2020: [Running a Kubernetes cluster on EKS with Fargate and Terraform · finleap engineering blog](https://engineering.finleap.com/posts/2020-02-27-eks-fargate-terraform/), and the source code is here: [GitHub - bsneider/tf-eks-fargate: use terraform to configure and deploy EKS with Fargate to AWS, also deploy sample app](https://github.com/bsneider/tf-eks-fargate).

At the time the tutorial was written, the latest Kubernetes version 1.22, and today’s latest is 1.27. **I am also using Terraform v1.2.3 to launch these resources, in addition to using v1.27 for the EKS cluster**.

When running the source code, I launched my eks cluster with the latest version, but received the following errors:

[1]

_Failed to create Ingress ‘2048-game/2048-ingress’ because: the server could not find the requested resource (post ingresses.extensions)_

_│_

_│ with module.eks.kubernetes\_ingress.app,_

_│ on eks/app.tf line 129, in resource “kubernetes\_ingress” “app”:_

_│ 129: resource “kubernetes\_ingress” “app” {_

Which references the line here: [https://github.com/bsneider/tf-eks-fargate/blob/main/eks/app.tf#L128](https://github.com/bsneider/tf-eks-fargate/blob/main/eks/app.tf#L128).

[2]

_│ Error: Waiting for default secret of “kube-system/alb-ingress-controller” to appear_

_│_

_│ with module.ingress.kubernetes\_service\_account.ingress,_

_│ on ingress/main.tf line 250, in resource “kubernetes\_service\_account” “ingress”:_

_│ 250: resource “kubernetes\_service\_account” “ingress” {_

_│_

Found here: [https://github.com/bsneider/tf-eks-fargate/blob/main/ingress/main.tf#L230](https://github.com/bsneider/tf-eks-fargate/blob/main/ingress/main.tf#L230)

^^In researching both errors, (first error: [K8s upgrade to 1.22.1 - Failed to create Ingress 'XXX' because: the server could not find the requested resource (post ingresses.extensions) · Issue #1386 · hashicorp/terraform-provider-kubernetes · GitHub](https://github.com/hashicorp/terraform-provider-kubernetes/issues/1386) and second error: [Error when creating kubernetes service account "Waiting for default secret to appear" · Issue #31029 · hashicorp/terraform · GitHub](https://github.com/hashicorp/terraform/issues/31029)), the solution appears to be downgrading the kubernetes version to 1.22, and structuring the kubernetes\_ingress into a _resource “kubernetes\_ingress\_v1” “app”_ format. However, I got the error:

_│ Error: Invalid resource type_

_│_

_│ on eks/app.tf line 169, in resource “kubernetes\_ingress\_v1” “app”:_

_│ 169: resource “kubernetes\_ingress\_v1” “app” {_

_│_

_│ The provider hashicorp/kubernetes does not support resource type “kubernetes\_ingress\_v1”._

I am wondering if there is a way to rewrite the _resource “kubernetes\_ingress” “app”_ so that I can continue to use the latest version of Kubernetes, rather than to revert back to v1.22.
