🔴 - To support my channel, I’d like to offer Mentorship/On-the-Job Support/Consulting - me@antonputra.com 👉 [UPDATED] AWS EKS Kubernetes Tutorial [NEW]: kzbin.info/aero/PLiMWaCMwGJXnKY6XmeifEpjIfkWRo9v2l&si=wc6LIC5V2tD-Tzwl
@AntonPutra3 жыл бұрын
🔴UPDATED🔴 How to create EKS Cluster using Terraform MODULES (AWS Load Balancer Controller + Autoscaler + IRSA) - kzbin.info/www/bejne/oYOunpaPeJxkgJY Monitor EKS & EC2 instances with MANAGED Prometheus - kzbin.info/www/bejne/Y5-4goF8dr1oiqs Native EKS Ingress: AWS Load Balancer Controller - kzbin.info/www/bejne/g4vco6uwl5ysd7c How to Add IAM User and IAM Role to AWS EKS Cluster? - kzbin.info/www/bejne/e3jHf2Vne5d9nNk How to Create EKS Cluster Using eksctl? - kzbin.info/www/bejne/a2fFmJ2qfLqtfac
👉 How to Manage Secrets in Terraform - kzbin.info/www/bejne/aX-TpXqBrNt1mqM 👉 Terraform Tips & Tricks - kzbin.info/www/bejne/bYScZaKLid5lsJY 👉 ArgoCD Tutorial - kzbin.info/www/bejne/sHjRlZqafMZkisU
@AntonPutra Жыл бұрын
Get Full-Length High-Quality DevOps Tutorials for Free - Subscribe Now! - kzbin.info
@roshankeram7460 Жыл бұрын
I am not able to find github link for above project I found it for modules one
@craigrodrigues34352 жыл бұрын
Excellent! In my opinion, using terraform to create EKS clusters is better than depending on CloudFormation or eksctl
@AntonPutra2 жыл бұрын
agree
@TigranAndonian Жыл бұрын
Anton, very good, one of the best explanation I saw! Thank you!
@13bhanuprakash2 жыл бұрын
Excellent Start to EKS via Terraform -- Many Thanks for this ....
@AntonPutra2 жыл бұрын
You're very welcome!
@MrEdinaldolaroque2 жыл бұрын
спасибо большое, Антон Путра! Thank you for sharing your knowledge!
@AntonPutra2 жыл бұрын
welcome =)
@AbdullaJandali9 ай бұрын
amazing tutorial, i encountered issue with the route table syntax tho had to troubleshoot it for few hours , i ended up using a different module , but other than that, its working smooth , thanks a lot
@pikaa-si9ie9 ай бұрын
Do u mind providing source code that?
@zhilin60682 жыл бұрын
simple but very clear, like this course
@AntonPutra2 жыл бұрын
Glad to hear that!
@rehantayyab82 Жыл бұрын
this is first video in series , should'nt it be gradually go from basic towards advanced .....great work indeed
@AntonPutra Жыл бұрын
Thank you! I've created so many tutorials about EKS that I don't even remember what's in them, lol.
@VinothRajkumar Жыл бұрын
Excellent video. Keep rocking with more videos
@AntonPutra Жыл бұрын
Thanks!
@nckillada88392 жыл бұрын
Awesome! Well explained, thanks!!
@AntonPutra2 жыл бұрын
You're welcome!
@davystrain721710 ай бұрын
brilliant workshop well done and thank you :)
@israel87072 жыл бұрын
@Anton Putra thanks very much for shared this amazing tutorial, I did it complete step by step and only I did small changes, but everithing is work ok, thanks again :)
@AntonPutra2 жыл бұрын
welcome!
@zakariamansouri351 Жыл бұрын
thank you so much Anton for providing such a content , subscribed 👌
@AntonPutra Жыл бұрын
My plreasure!
@unixbashscript95863 жыл бұрын
Excellent stuff!
@AntonPutra3 жыл бұрын
Glad you liked it!
@viniciuscordeiro1360 Жыл бұрын
thank you very much!
@AntonPutra Жыл бұрын
Welcome!
@brahmaiahboddu57623 жыл бұрын
Super👍
@AntonPutra3 жыл бұрын
Thank you 👍
@albertoporras33412 жыл бұрын
Great video, learning a lot. Thanks a lot 5 stars video.
@AntonPutra2 жыл бұрын
Thanks Alberto!
@albertoporras33412 жыл бұрын
@@AntonPutra Quick question! how I can SSH to EKS Worker Nodes, which variables I need to add and if I need to add it to 7-nodes.tf or in 0-provider.tf file?
@Randych Жыл бұрын
@@albertoporras3341 out of curiosity, WHY on earth would you do that
@david23582 жыл бұрын
Thank you, learned a lot and subscribed!! 👍
@AntonPutra2 жыл бұрын
Welcome aboard! :)
@christianibiri3 жыл бұрын
Great video!!!
@AntonPutra3 жыл бұрын
Thank you!!
@675FresH Жыл бұрын
Спасибо большое за гайд, очень помогло!
@AntonPutra Жыл бұрын
pojaluysta =)
@Whitegatellc12 жыл бұрын
Great Video Anton! For-Self Managed K8S clusters using EKS but using " worker-groups" as worker nodes with Auto-Scaling, will the same policies you attached to your IAM role be the same? Looking forward to more great stuff from you!
@AntonPutra2 жыл бұрын
Thanks Abimbola! I haven't tested, but should be the same.
@yusranad3 жыл бұрын
Awesome video. I have been automated my deployment EKS using terraform since I watch your video it make me to practice it. I have question is the terraform can execute a script since I'm using rancher inside the kubernetes for manage my Kubernetes using EKS.
@AntonPutra3 жыл бұрын
Thanks, yes terraform can execute local script and/or remote script. Frequently it is used with configuration management tools such as Ansible, Puppet, etc. Here is a reference www.terraform.io/language/resources/provisioners/local-exec www.terraform.io/language/resources/provisioners/remote-exec
@felipealvarez19822 жыл бұрын
thanks for uploading the video. I found the instructions to be a little too quick, and pasting some of the code examples were hard to follow because they were too large/long, and the video pace was a bit quick.
@AntonPutra2 жыл бұрын
Thanks for the feedback, you can find the source code in the github repo
@MB9820102 жыл бұрын
Hey Anton, thanks for this video it is awsome! Could you please do another one withTerraform but with ArgoCD included? Thanks again.
@AntonPutra2 жыл бұрын
Sure!
@mehmetnuricetin4104 Жыл бұрын
Thanks Anton for great video. I try to create CI-CD pipeline for github action. There is some code exemple that I can use?
@AntonPutra Жыл бұрын
Sure, 1. GitHub Actions Self Hosted Runner (Autoscaling with Kubernetes) 2. How to Create Your Own GitHub Actions? kzbin.info/www/bejne/oKjHeGl6YqZ1Z80 3. Build a Docker Image and Publish It to GCP GCR & Artifact Registry using Github Actions - kzbin.info/www/bejne/bJWveZakobWclbc 4. Build a Docker Image and Publish It to AWS ECR using Github Actions kzbin.info/www/bejne/fqeYhpZ4jtiYq9U
@mehmetnuricetin4104 Жыл бұрын
And I am really junior :) I mean also if there is some repository for using terraform to create github action for eks! Thanks again
@rehantayyab82 Жыл бұрын
u did not tell about vpcendpoint which are required when we deploy app on nodegroup in private subnets and some security group settings as well , please can you clarify on this ?
@AntonPutra Жыл бұрын
Security Group is managed by the EKS, not sure what do you mean.. You can expose app using private or public service of type load balancer.
@amittaywade87532 жыл бұрын
Nice video and explaination, I have tried everything. JFYI cluster-autoscaler.yaml code is missing in your DOC
@AntonPutra2 жыл бұрын
Thanks
@nforlife2 жыл бұрын
Great video as usual Anton. could you add HPA ?
@AntonPutra2 жыл бұрын
Thanks, I already have 2 Horizontal Pod Autoscaler CUSTOM METRICS & PROMETHEUS - kzbin.info/www/bejne/n6DHomBqqNeLd5o Kubernetes Horizontal Pod Autoscaler - kzbin.info/www/bejne/pnrCoYCpqsatp9k
@supreethashetty7493 Жыл бұрын
Could please show create eks node using launch template
@AntonPutra Жыл бұрын
Sure, here - github.com/antonputra/tutorials/blob/b09834856cc27ad8aa2fde45fbcd655a9a1425dd/lessons/150/terraform/7-nodes.tf#L129-L139
@lawrenceobrero42282 жыл бұрын
Great tutorial! Thanks for the video. I'm curious why there is no security groups in the terraform files?
@AntonPutra2 жыл бұрын
Thanks, as far as I remember EKS will generate them for you.
@ajadavis20002 жыл бұрын
hello! thank u v much this is v informational. was wondering how to limit public network access through inbound rules/security groups like an ec2 - currently the loadbalancer is accessible anywhere
@AntonPutra2 жыл бұрын
It depends on the load balancer. Network load balancer does not have security groups and inherit rules from ec2 instances. Application load balancer needs it's own security group. If you can explain your use case i can give more specific recommendation.
@ajadavis20002 жыл бұрын
@@AntonPutra thanks so much for getting back. so i use the hasura graphql engine in a container, and if i deploy with a load balancer, i can reach the UI via a call to the dns. The graphql also has to be accessible to rds and an app in cloudfront. so it appears that maybe the ec2 security group is best to manage public accessibility of the hasura UI, and an application load balancer is the best solution to manager the graphql engine and its connections to the rds and cloudfront application - does this sound right?
@mantikoragio6555 Жыл бұрын
Thanks a lot! Could you tell how you made VS Code folder icons prettier & what's the terminal Theme? Looks beautiful! :)
@AntonPutra Жыл бұрын
I believe I used "this extension - marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons. For the terminal it's item2 + ohmyz.sh/
@kossei80964 ай бұрын
How do you pass aws credential to the pod? Because i get an error "unable to locate credential. You can configure credentials by running aws configure"
@kossei80964 ай бұрын
Turns out i just miss indentation 😅
@AntonPutra4 ай бұрын
@@kossei8096 ok :)
@leo59462 жыл бұрын
do we need to create an iam role demo explicitly ? u did not create one in the video, or do you have one already ?
@AntonPutra2 жыл бұрын
It's in the terraform code. Yes, you need 1 role for control plane and another one for node pool.
@ariskaraiskos80792 жыл бұрын
Hi Anton, great video mate, may i ask, can we set up autoscaler to scale automatically based on the load? and if yes, how? thanks!
@AntonPutra2 жыл бұрын
Sure, i have few tutorials on my channel how to scale based on cpu & memory as well as custom metrics defined using prometheus
@andreykaparulin92143 жыл бұрын
Thanks
@AntonPutra3 жыл бұрын
Welcome
@vimaladeshmukh40172 жыл бұрын
Hey awesome video sir.. one request, u havent attached service account,cluster role and binding related to autoscaler group in the link you provided. Could you please add that in your notes.🙏 Whole cluster-autoscaler.yaml file is missing in the given link.
@AntonPutra2 жыл бұрын
this one? github.com/antonputra/tutorials/blob/main/lessons/102/k8s/cluster-autoscaler.yaml
@kiranshelke16272 жыл бұрын
Nice video Anton. Could you please share terraform script using EKS fargate?
@AntonPutra2 жыл бұрын
Thanks, here - github.com/antonputra/tutorials/tree/main/lessons/102
@rellimcire Жыл бұрын
Your videos have helped me a lot. However, I'm still confused about load balancing. Somehow your cluster knows to create a load balancer when you create a LoadBalancer service. My cluster does not do that. Is there some setting or policy I need to add somewhere to make that work?
@AntonPutra Жыл бұрын
Kubernetes project have intree controllers that responsible for creating load balancers in different supported clouds. If you on premise or even bare metal try to install metallb. Otherwise just kubectl describe svc to get error message
@rellimcire Жыл бұрын
@@AntonPutra I'm in EKS. But your reply helped a lot. I'm tracing error now.
@shulyakav3 жыл бұрын
Скажи, а у тебя было время посмотреть в сторону Karpenter? я вот глянул, крутая штука, вроде бы.
@AntonPutra3 жыл бұрын
Poka net, sdelay video pro karpenter navernoe cherez nedelyu.
@crimson27271 Жыл бұрын
does the code for the autoscaler need to be updated? the pod keeps crashing for me, at firts i though it was the amount of memory but after raising it it keeps crashing and the logs are way to many to make sense, when i use describe pod i just get Back-off restarting failed container
@AntonPutra Жыл бұрын
make sure you match autoscaler version to your k8s as close as possible
@crimson27271 Жыл бұрын
@@AntonPutra I change the image version to 1.22.1 but still gave me problems, then i notice that the problem was that i did not change the account number on my rol, and after doing the change seens to be running just fine.
@AntonPutra Жыл бұрын
@@crimson27271 good to know, need to put a warning there =)
@arindamghosh32992 жыл бұрын
How do you tackle the situation when the cluster autoscaler has changed the cluster scaling from 1 to 2 (and terraform won't know this) and then you need to perform a terraform deployment? In that case the scaling config will show the desired size of the cluster node has been changed and will try to put it back to 1, isn't it?
@AntonPutra2 жыл бұрын
It should not happen. How do you manage your node pool? (managed, unmanaged, or separate autoscaling group)
@david23582 жыл бұрын
Quick question: why didn't you also add add-ons in your eks.tf file? Will the cluster work without add-ons?
@AntonPutra2 жыл бұрын
It will work with and without adonds. Do you have any specific addon in mind?
@aryadiadi68882 жыл бұрын
@@AntonPutra EFS
@Randych Жыл бұрын
@@aryadiadi6888 ew fargate
@jinkahari2 жыл бұрын
Hi Anton, I am getting errror " │ Inappropriate value for attribute "route": element 0: attribute "core_network_arn" is required." in route tables creation.
@AntonPutra2 жыл бұрын
if i get the same error will provide a feedback
@fenilshah7310 Жыл бұрын
What if I don't want to use elastic IP? Is there another way to configure this?
@AntonPutra Жыл бұрын
elastic ip for what? nat? well use public subnets with igw
@rritsoftwaresolutions9566 Жыл бұрын
super all the best keep it up , i like yours video , great super amazing video , PLEASE DO MAKING SAME REAL TIME EKS CLUSTER VIDEOS , i appreciate you /////
@George-mk7lp2 жыл бұрын
what terraform version did you use in this tutorial?
@AntonPutra2 жыл бұрын
I don't remember the exact version but higher 1.1.x. Next time will commit terraform lock file.
@james-mo2pk2 жыл бұрын
Why did you use only one nat gateway in this section?
@AntonPutra2 жыл бұрын
Well, the general recommendation by AWS to use nat gateway per availability zone. But for the last five years, I have never had issues with nat gateways. It's cost vs. ha balance that you need to decide for yourself. AWS will always try to convince you to use multi az and multi-region :)
Test? You can open it in AWS console and find scheme property.
@rajenthapa41782 жыл бұрын
Thank you very much for the video Anton. It was really awesome and helpful. How can we setup the aws load balancer controller for eks ingress via Terraform?
@AntonPutra2 жыл бұрын
Thanks, I usually configure only AWS staff using terraform such as IAM permissions for controller. Deployment itself (YAML) is managed by other tools such as flux. You could however to use Terraform Kubernetes Provider - registry.terraform.io/providers/hashicorp/kubernetes/latest/docs
@JP-qx6tw3 жыл бұрын
Hi Anton, If we deploy an ALB how can we reuse the ALB for other services/ingress?
@AntonPutra3 жыл бұрын
There is a way with AWS Load Balancer Controller.You need to create TargetGroupBinding. It is a custom resource (CR) that can expose your pods using an existing ALB TargetGroup or NLB TargetGroup. I'm. going to create tutorial soon, here is a link for official doc - kubernetes-sigs.github.io/aws-load-balancer-controller/v2.3/guide/targetgroupbinding/targetgroupbinding/
@mum0l572 жыл бұрын
Very nice, but you could speak more slowly.. ;)
@AntonPutra2 жыл бұрын
Thank, noted!
@qizhang57492 жыл бұрын
Lol had to check my playback speed
@sobankhan7517 Жыл бұрын
SIr thanks
@AntonPutra Жыл бұрын
welcome!
@George-mk7lp2 жыл бұрын
Why do we use cluster autoscaler as deployment if we already have node autoscaling in the nodes.tf file ? I mean this one: resource "aws_eks_node_group" "private-nodes" { cluster_name = aws_eks_cluster.demo.name node_group_name = "private-nodes" node_role_arn = aws_iam_role.nodes.arn subnet_ids = [ aws_subnet.private-us-east-1a.id, aws_subnet.private-us-east-1b.id ] capacity_type = "ON_DEMAND" instance_types = ["t3.small"] scaling_config { desired_size = 2 max_size = 5 min_size = 2 } update_config { max_unavailable = 1 }
@AntonPutra2 жыл бұрын
Autoscaling block in terraform only configures AWS autoscaling group with min, max and desired size. Job of autoscaler deployed in K8s is to adjust desired size based on the load.
@Randych Жыл бұрын
I don't understand: - why public subnets are REQUIRED - why are you forced to connect private subnets to internet - why do you use private LB if it's same as public LB since private subnets are connected to internet
@AntonPutra Жыл бұрын
- only if you want to expose your apps to internet - typically we have 3 types of subnets: 1. public with internet gateway 2. private with nat gateway 3. isolated without access to internet, usually used for databases - it's not the same. Private LB only accessible within VPC, public LBs accessible from the internet
@Randych Жыл бұрын
@@AntonPutra oh right, DB subnets, thanks for reminder, I'll go over it. Also your tutorial is shallow on launch template topic. You do know that slightest wrong in mandatory user data results in "instances failed to join cluster" yet you skipped it. Why user data? How about 99 max pods on t3.small?
@suganthselvan Жыл бұрын
Good content, but too fast making it less effective
@pravinkhot8626 Жыл бұрын
Very fast
@AntonPutra Жыл бұрын
noted
@cryptographbd11762 жыл бұрын
Hi sir, This is really helpfull videos for me, I faces some issues here on route.tf file, when I press terraform apply then its shows this issues- 1. Error: Incorrect attribute value type │ │ on routes.tf line 4, in resource "aws_route_table" "private": │ 4: route = [ │ 5: { │ 6: cidr_block = "0.0.0.0/0" │ 7: nat_gateway_id = aws_nat_gateway.nat.id │ 8: carrier_gateway_id = "" 2. Inappropriate value for attribute "route": element 0: attribute "core_network_arn" is required 3. Error: Incorrect attribute value type │ │ on routes.tf line 30, in resource "aws_route_table" "public": │ 30: route = [ │ 31: { │ 32: cidr_block = "0.0.0.0/0" │ 33: gateway_id = aws_internet_gateway.igw.id │ 34: nat_gateway_id = "" │ 35: carrier_gateway_id = "" help me to solve this issues.