Create AWS EKS Fargate Using Terraform (EFS, HPA, Ingress, ALB, IRSA, Kubernetes, Helm, Tutorial)

Поділитися
Вставка
  • Опубліковано 20 вер 2024

КОМЕНТАРІ • 55

  • @AntonPutra
    @AntonPutra  Рік тому +1

    🔴 - To support my channel, I’d like to offer Mentorship/On-the-Job Support/Consulting - me@antonputra.com
    👉 [UPDATED] AWS EKS Kubernetes Tutorial [NEW]: ua-cam.com/play/PLiMWaCMwGJXnKY6XmeifEpjIfkWRo9v2l.html&si=wc6LIC5V2tD-Tzwl

  • @therafeeq1
    @therafeeq1 15 днів тому +1

    Great work, Anton! Perfect speed, and the content was delivered just right.

  • @AntonPutra
    @AntonPutra  2 роки тому +3

    🔴UPDATED🔴 How to create EKS Cluster using Terraform MODULES (AWS Load Balancer Controller + Autoscaler + IRSA) - ua-cam.com/video/kRKmcYC71J4/v-deo.html

  • @AntonPutra
    @AntonPutra  Рік тому +2

    👉 How to Manage Secrets in Terraform - ua-cam.com/video/3N0tGKwvBdA/v-deo.html
    👉 Terraform Tips & Tricks - ua-cam.com/video/7S94oUTy2z4/v-deo.html
    👉 ArgoCD Tutorial - ua-cam.com/video/zGndgdGa1Tc/v-deo.html

  • @AntonPutra
    @AntonPutra  Рік тому +1

    Get Full-Length High-Quality DevOps Tutorials for Free - Subscribe Now! - ua-cam.com/users/AntonPutra

  • @shoaibshaikh6583
    @shoaibshaikh6583 2 роки тому +2

    Great work. Just wanted to suggest to keep Graphical explanation about services and connectivity between different tools before jumping into practical. but still I must say well done.

  • @avinashnadendla7869
    @avinashnadendla7869 2 роки тому +3

    You are amazing man

  • @AntonPutra
    @AntonPutra  Рік тому +2

    🟢 [New] Terragrunt Tutorial: Create VPC, EKS from Scratch! (Step-by-Step) - ua-cam.com/video/yduHaOj3XMg/v-deo.html

  • @ambrishpatil4352
    @ambrishpatil4352 Рік тому +1

    Thanks buddy for useful video 👍

  • @vikasjyotitiwari4826
    @vikasjyotitiwari4826 Рік тому +2

    great work Anton. I am trying to build the fargate container with EKS 1.26, but after follow the steps at 7:00 Min, I started getting the error you saw on first terminal at 07:06
    Warning LoggingDisabled 15s fargate-scheduler Disabled logging because aws-logging configmap was not found. configmap "aws-logging" not found
    CoreDNS POD never comes up and stays in pending state. I am going to try on EKS1.22 to see if this does not happen, but have you see this issue?

    • @AntonPutra
      @AntonPutra  Рік тому

      Thanks! check this
      You created the CoreDNS pods with a default annotation that maps them to the Amazon Elastic Compute Cloud (Amazon EC2) compute type. To schedule them on a Fargate node, remove the Amazon EC2 compute type.
      repost.aws/knowledge-center/eks-resolve-pending-fargate-pods
      and
      github.com/terraform-aws-modules/terraform-aws-eks/issues/2069

  • @mustafaaliaykon286
    @mustafaaliaykon286 2 роки тому

    Hi can you share the steps for production because i think EKS should not be in public subnet. Very clean explanation thanks!

    • @AntonPutra
      @AntonPutra  2 роки тому +1

      you only create public subnets for "public" load balancer, all your nodes located in private subnets with NAT gateway.
      Public subnets are optional, you can remove them

  • @babaramdass462
    @babaramdass462 Рік тому +1

    Based. Thanks

  • @lopezzelo2502
    @lopezzelo2502 8 місяців тому +1

    Hello, just to be sure, now on recent version the annotation for core dns is gone? And we need to create the profile for the core dns pod to be able to launcnh ? Thank you for the content ❤

    • @AntonPutra
      @AntonPutra  8 місяців тому

      Thanks, it's possible, but I don't use Fargate in production and only review it when I refresh the tutorial.

  • @hY-ug8vn
    @hY-ug8vn 9 місяців тому

    could you do a tutorial for AWS ECS with FARGATE, and ECR as well please

    • @AntonPutra
      @AntonPutra  9 місяців тому

      Well, maybe in the future, but it's not as common as EKS.

    • @hY-ug8vn
      @hY-ug8vn 8 місяців тому

      @@AntonPutra Thank you, it will be just useful to see how you handle multiple container definitions for ECS task definition, all other solutions out there are badly explained and complex to understand.

  • @lichir
    @lichir 2 роки тому +1

    Great video!

  • @abhijeetsamanta4246
    @abhijeetsamanta4246 Рік тому

    I am trying to add deployment with efs however its not working giving below error as Pod not supported on Fargate: volumes not supported: host is of an unsupported volume Type

  • @lautarodamore2548
    @lautarodamore2548 2 роки тому

    Great video! I have i question Anton, where you read the information for the aws-load-balancer-controller Helm chart? To know the variables to override for example? I trying to integrate the fluent-bit Helm chart but i coulnt find it.

    • @AntonPutra
      @AntonPutra  2 роки тому +1

      You can use helm show command, example "helm show values karpenter/karpenter"

  • @jarmenk
    @jarmenk Рік тому

    Вы используете CoreDNS Addon? Не совсем понятно откуда он начинает деплоиться

    • @AntonPutra
      @AntonPutra  Рік тому +1

      I did not explicitly use the CoreDNS managed EKS add-on. As far as I remember, I had to remove taints or do something else (patch), but the process for new EKS 1.27 and higher may be different.

    • @jarmenk
      @jarmenk Рік тому

      @@AntonPutra thanks

  • @shoaibshaikh6583
    @shoaibshaikh6583 2 роки тому +1

    I have a question sir where did you store the terraform state file?

    • @AntonPutra
      @AntonPutra  2 роки тому

      For the demo locally, for production use i store it in S3 with dynamoDB lock. Some in terraform cloud such as IAM policies.

  • @Daveooooooooooo0
    @Daveooooooooooo0 4 місяці тому

    Ebs is supported

    • @AntonPutra
      @AntonPutra  4 місяці тому

      "You can't mount Amazon EBS volumes to Fargate Pods."
      AWS Fargate considerations - docs.aws.amazon.com/eks/latest/userguide/fargate.html

  • @rohitnarula7038
    @rohitnarula7038 11 місяців тому

    Great work Anton. One quick question can we run both Fargate and EC2 together ?

    • @AntonPutra
      @AntonPutra  11 місяців тому

      Can you combine a Fargate profile with traditional node groups?' Yes, you can. Fargate only affects the selected namespaces, so it's possible.

    • @rohitnarula7038
      @rohitnarula7038 11 місяців тому

      @@AntonPutra : So in that case how would DNS works, you changed the type to fatgate from ec2.. Should we leave that to default

    • @AntonPutra
      @AntonPutra  11 місяців тому

      @@rohitnarula7038 If you use ec2, just keep dns as is.

  • @ozyozb
    @ozyozb 11 місяців тому

    hey, I'm following the tutorial but having trouble after the "aws eks update-kubeconfig --name demo --region us-east-1" command. I changed it to matching my cluster and region, it created the config file. But when I try to get pods I get the following error:
    E1001 11:58:54.188249 182883 memcache.go:265] couldn't get current server API group list: the server has asked for the client to provide credentials
    error: You must be logged in to the server (the server has asked for the client to provide credentials)
    And on the aws web interface I see the following message:
    Your current IAM principal doesn’t have access to Kubernetes objects on this cluster.
    This may be due to the current user or role not having Kubernetes RBAC permissions to describe cluster resources or not having an entry in the cluster’s auth config map
    Any idea what would be wrong?

    • @AntonPutra
      @AntonPutra  11 місяців тому

      Most likely you used different user to create EKS. By default only user that created a cluster gets access. You need to create new local profile with the same credentials and authenticate with EKS again. Example - aws eks update-kubeconfig --name dev-demo --region us-east-2 --profile crossplane

    • @ozyozb
      @ozyozb 11 місяців тому

      @@AntonPutra hi, thank you for your reply. I created the EKS with terraform and terraform authenticates aws with OIDC. I'm not sure how to authenticate that as a user. It's confusing :)

  • @mayarafernandes2016
    @mayarafernandes2016 Рік тому

    Great video!
    How to create more namespaces in eks fargate via terraform?

    • @AntonPutra
      @AntonPutra  Рік тому +1

      Thanks, just add more fo these - github.com/antonputra/tutorials/blob/main/lessons/113/terraform/7-kube-system-profile.tf#L21-L36

  • @tanergur2128
    @tanergur2128 2 роки тому

    Getting Error: (Kubernetes cluster unreachable:: with helm_release.metrics-server,
    │ on 9-metrics-server.tf line 13, in resource "helm_release" "metrics-server":
    │ 13: resource "helm_release" "metrics-server") after deploying terraform with helm_release resource. Any idea to fix?

    • @AntonPutra
      @AntonPutra  2 роки тому

      try to rerun, if error persist check version and use terraform lock file. Are you able to connect to eks cluster from the terminal?
      aws eks update-kubeconfig

    • @tanergur2128
      @tanergur2128 2 роки тому

      @@AntonPutra Yes thats right, Anton. I am able to connect to cluster. When you say check version, is that helm version? I have not installed helm package on my linux instance. I remember in the video you said you dont need to install extra package. Should I ? Thanks.

    • @kayoutube690
      @kayoutube690 2 роки тому

      I have the same issue Anton, what will be the fix for this issue?

    • @cristopheradasme170
      @cristopheradasme170 2 роки тому

      I solved adding token argument to helm provider, like so:
      data "aws_eks_cluster_auth" "cluster-auth" {
      depends_on = [aws_eks_cluster.cluster]
      name = aws_eks_cluster.cluster.name
      }
      provider "helm" {
      kubernetes {
      host = aws_eks_cluster.cluster.endpoint
      cluster_ca_certificate = base64decode(aws_eks_cluster.cluster.certificate_authority[0].data)
      token = data.aws_eks_cluster_auth.cluster-auth.token
      exec {
      api_version = "client.authentication.k8s.io/v1beta1"
      args = ["eks", "get-token", "--cluster-name", aws_eks_cluster.cluster.id]
      command = "aws"
      }
      }
      }│

  • @franklin.lisboa
    @franklin.lisboa Рік тому

    I followed the AWS Official Doc and It didn't work, thank you for this video.

    • @AntonPutra
      @AntonPutra  Рік тому

      Welcome, they focus on eksctl which is not most of the people use =)

    • @franklin.lisboa
      @franklin.lisboa Рік тому

      ​@@AntonPutra yeah, I haven't used Helm until now too but the way you walked through the steps was good enough to get it.
      I believe the problem could be the missing elb tags in subnets and some annotations I'm preety sure I didn't read in the doc... It was quite frustrating follow step by step the owner doc and the whole thing just doesn't work. Thanks again

  • @flesz__
    @flesz__ 2 роки тому

    I was trying to undestand what is Rafael and only later realised it's 'a profile' lol