Git Product home page Git Product logo

k8s-jjtech-1's Introduction

k8s-jjtech

Deploy EKS CLuster with Fargate using Terraform

Prerequisites:

Note

  • This cluster based on the current configuration will be created in the us-east-1 regiona and is setup to wotk only with fargate
  • Rerun terraform apply again if you receive Error: creating EC2 VPC: RequestError: send request failed │ caused by: Post "https://ec2.us-east-1.amazonaws.com/": read tcp 192.168.1.71:53727->209.54.181.193:443: wsarecv: An existing connection was forcibly closed by the remote host. and it should deploy the resources
  • The deployment takes over 15 minutes

Resources Created

  • VPC and all networking components
  • EKS cluster
  • aws load balancer controller for ingress
  • Fargate profiles for application, aws-load-balancer-controller and Kube-system namespaces

Deployment Steps

  1. terraform init
  2. terraform fmt
  3. terraform validate
  4. terraform plan
  5. terraform apply --auto-appprove

steps after succesful deployment of cluster with terraform

  • After you provision the EKS with terraform, you would need to update your Kubernetes context to access the cluster with the following command - aws eks update-kubeconfig --name name-of-cluster --region region-where-cluster-is-deployed

  • To patch coredns to run on fargate nodes, run the command below


kubectl patch deployment coredns
-n kube-system
--type json
-p='[{"op": "remove", "path": "/spec/template/metadata/annotations/eks.amazonaws.com~1compute-type"}]'

Install minikube in ubuntu linux

  1. Navigate to this url for installaition instructions
  1. Select your OS (in this case linux)

  2. Install docker for ubuntu. Use link for installtion guide (https://docs.docker.com/engine/install/ubuntu/)

  • sudo apt-get update
  • sudo apt-get install ca-certificates curl gnupg
  • sudo install -m 0755 -d /etc/apt/keyrings
  • curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  • sudo chmod a+r /etc/apt/keyrings/docker.gpg
  • echo
    "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu
    "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" |
    sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  • sudo apt-get update
  • sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  • docker --version
  • sudo usermod -aG docker $USER && newgrp docker
  1. Install Virtualbox using the link for installation guide : https://www.virtualbox.org/wiki/Linux_Downloads

Add the following line to your /etc/apt/sources.list

  • sudo vim /etc/apt/sources.list

Then paste the following below and save. press "i" to be on insert mode and ":wq!" to save the file

Download and verify the oracle public key by running the command below

Install virtual box by running

  • sudo apt-get update
  • sudo apt-get install virtualbox-6.1
  1. STart Minikube by running
  • minikube start

Install Minikube on Windows

What you’ll need

  • 2 CPUs or more
  • 2GB of free memory
  • 20GB of free disk space
  • Internet connection
  • Container or virtual machine manager, such as: Docker, QEMU, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMware Fusion/Workstation

To install the latest minikube stable release on x86-64 Windows using Chocolatey:

  1. If the Chocolatey Package Manager is installed, use the following command:
  • choco install minikube
  1. From a terminal with administrator access (but not logged in as root), run:
  • minikube start
  1. STart intercating with your cluster by running
  • kubectl get po

k8s-jjtech

k8s-jjtech-1's People

Contributors

anselmenumbisia avatar mayor01234 avatar

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.