Giter VIP home page Giter VIP logo

aws-eks-setup-terraform's Introduction

Quite recently, I was tasked with creating a production ready Kubernetes cluster from the ground up at Darey.io where I Learn DevOps via a Project Based Learning model. This task gave me a deep and practical insight into the technical structure and setup of Kubernetes. Though it took me a while, I was able to set it up as requested and as per documentation.

Moving forward with the added knowledge, I decided to set up an AWS EKS Cluster which I would use for some application deployments. This next tasks would center around deployments and persisting data in k8s. However, this article is only a guide to provisioning your own AWS EKS Cluster using IaC(Terraform). It is advisable to do this first with the console if you don't already have knowledge as to how it all works.

Terraform is the IaC tool for this guide(knowledge of terraform is a prerequisite for this process), below are the steps to follow in setting up your EKS Cluster using terraform on your control machine;

  1. Setup a controller client machine(can be an EC2 instance or your local machine)

  2. Install Terraform, Kubectl, AWSCLI, aws-iam-authenticator

  3. Create a folder where you'd clone the Terraform repo already provide by Hashicorp/AWS repo

  4. Clone down the [Github Repo] (https://github.com/hashicorp/terraform-provider-aws) into your controller client machine repo clone

  5. cd into the folder, cd into examples dir, cd into eks-getting-started Image

  6. ls to see the '.tf' files tf files

  7. Feel free editing to your preference, things such as Region, names, instance type for the worker nodes, version of Kubernetes among others.

  8. Run terraform init to initialize the folder, terraform plan to see what resources would be created. 18 resources would be created in building this cluster. terraform apply to create the resources. It would take some 8-10 min for the cluster to be built and ready to go. Init apply

  9. Now the cluster is built, you have to update the --kubeconfig with the awscli command

aws eks --region <region> update-kubeconfig --name <cluster-name>

kubeconfig

  1. Test that everything works by running a kubectl command(any kubectl command) to show the nodes in your cluster
kubectl get nodes -o wide

get-nodes

aws-eks-setup-terraform's People

Contributors

royalt1234 avatar

Watchers

 avatar

Forkers

adabala123

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.