Giter Site home page Giter Site logo

eks's Introduction

Install Kubectl

sudo curl -O https://s3.us-west-2.amazonaws.com/amazon-eks/1.24.7/2022-10-31/bin/linux/amd64/kubectl

sudo chmod +x ./kubectl

sudo mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin

sudo echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc

source /root/.bashrc

kubectl version --short --client

Install Eksctl

sudo curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp

sudo mv /tmp/eksctl /usr/local/bin

export PATH=$PATH:/usr/local/bin

sudo echo 'export PATH=$PATH:/usr/local/bin' >> /root/.bashrc

source /root/.bashrc

eksctl version

Upgrade AWS CLI

sudo yum remove awscli -y

sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

sudo unzip awscliv2.zip

sudo ./aws/install

sudo ln -s /usr/local/bin/aws /bin/aws

aws --version

AWS IAM Authenticator

curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_linux_amd64

chmod +x ./aws-iam-authenticator

mkdir -p $HOME/bin && cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$PATH:$HOME/bin

echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc

aws-iam-authenticator version

Create EKS Cluster

eksctl create cluster --name nginxcluster --nodes-min 1 --nodes-max 2 --alb-ingress-access --region ap-southeast-1 --node-type t2.medium --ssh-public-key cc-nasir

eksctl create cluster --name nasir-nginx-cluster --nodes-min 1 --nodes-max 2 --alb-ingress-access --region ap-southeast-1 --vpc-public-subnets=subnet-0eed122751ceb5d7a,subnet-02c11d6933657211c --vpc-private-subnets=subnet-0a81ab3974f428260,subnet-0f62bde5cde2fbc99 --node-type t2.medium --ssh-public-key cc-nasir --profile cc

kubectl get nodes

Install Deplyment and Service

git clone https://github.com/nasir19noor/eks.git

cd eks

kubectl apply -f nginx.yaml

kubectl get pods

kubectl apply -f nginx-service.yaml

kubectl get svc -o wide

Delete Resources

kubectl delete service nginx

kubectl delete deploy nginx

eksctl delete cluster --name nginxcluster --region ap-southeast-1 --wait

eks's People

Contributors

nasir19noor avatar

Watchers

 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.