Git Product home page Git Product logo

ecs-rds's Introduction

Hi there ๐Ÿ‘‹

k8s-nest is a โœจ special โœจ repository because its README.md (this file) appears on your GitHub profile. Here are some ideas to get you started:

  • ๐Ÿ”ญ Iโ€™m currently working on Kubernetes Project
  • ๐ŸŒฑ Iโ€™m currently learning Cloud Computing even though I have done multiple certifications, the technology keeps evolving and we should keep myself updated
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on this project
  • ๐Ÿค” Iโ€™m looking for help with more IaC (Infrastructure as Code) for the vast open source community
  • ๐Ÿ’ฌ Ask me about AWS, Google Cloud Platform, JavaScript/NodeJS, Docker, Kubernetes, Java, ReactJS, Security best practices
  • ๐Ÿ“ซ How to reach me: [email protected]
  • ๐Ÿ˜„ Pronouns:
  • โšก Fun fact: Life is beautiful, live each day

Codacy Badge Codacy Badge

All k8s manifests lives here

  1. ECS Cluster with Service, Task definitions and Load Balancers

Creating AWS EKS version 1.21 with containerd as CRI:-

EKS_VERSION=1.21

AMI_ID=$(aws ssm get-parameter
--name /aws/service/eks/optimized-ami/${EKS_VERSION}/amazon-linux-2/recommended/image_id
--query "Parameter.Value" --output text)

AWS_REGION=${AWS_DEFAULT_REGION:-us-east-1}

CLUSTER_NAME=containerd-eks

cat > eksctl-containerd.yaml <<EOF

apiVersion: eksctl.io/v1alpha5 kind: ClusterConfig metadata: name: ${CLUSTER_NAME} region: ${AWS_REGION} version: "${EKS_VERSION}" managedNodeGroups:

  • name: containerd ami: ${AMI_ID} overrideBootstrapCommand: | #!/bin/bash /etc/eks/bootstrap.sh ${CLUSTER_NAME} --container-runtime containerd EOF

eksctl create cluster -f eksctl-containerd.yaml

eksctl delete nodegroup --cluster=containerd-eks --name=containerd

eksctl create nodegroup --cluster=containerd-eks --spot --instance-types=t3.medium

eksctl utils associate-iam-oidc-provider
--region us-east-1
--cluster containerd-eks
--approve

eksctl create fargateprofile
--cluster containerd-eks
--name containerd-fp
--namespace game-2048

kubectl annotate serviceaccount -n kube-system alb-ingress-controller
eks.amazonaws.com/role-arn=arn:aws:iam::195725532069:role/eks-alb-ingress-controller

eksctl create iamserviceaccount
--name my-serviceaccount
--namespace kube-system
--cluster containerd-eks
--attach-policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
--approve

CLUSTER_NAME=eks-fargate-alb-demo

eksctl create cluster --name eks-fargate-alb-demo --region us-east-1 --fargate

eksctl utils associate-iam-oidc-provider --cluster eks-fargate-alb-demo --approve

STACK_NAME=eksctl-eks-fargate-alb-demo-cluster VPC_ID=$(aws cloudformation describe-stacks --stack-name "$STACK_NAME" | jq -r '[.Stacks[0].Outputs[] | {key: .OutputKey, value: .OutputValue}] | from_entries' | jq -r '.VPC') AWS_ACCOUNT_ID=$(aws sts get-caller-identity | jq -r '.Account')

eksctl create iamserviceaccount
--name alb-ingress-controller
--namespace kube-system
--cluster $CLUSTER_NAME
--attach-policy-arn arn:aws:iam::$AWS_ACCOUNT_ID:policy/ALBIngressControllerIAMPolicy
--approve

Launch Templates

aws ec2 create-launch-template
--launch-template-name myeks-cluster-managednodegroup
--version-description "launch templated for creating and managing managed node groups"
--launch-template-data '{"InstanceType": "t3.medium","TagSpecifications":[{"ResourceType":"instance","Tags":[{"Key":"purpose","Value":"eks-nodes"}]}] }'

aws eks create-nodegroup
--cluster-name myeks-cluster \ --nodegroup-name myeks-nodegroup
--subnets subnet-0d145ab4a17fcb368 subnet-01748f5bafb75e7a8
--node-role 'arn:aws:iam::195725532069:role/node-instance-role'
--launch-template name=myeks-cluster-managednodegroup,version=1

aws ec2 create-launch-template-version
--launch-template-name myeks-cluster-managednodegroup
--version-description "New template version with the addition of key pair and security group allowing SSH access"
--source-version 1
--launch-template-data '{ "KeyName":"eks-lt-keypair", "SecurityGroupIds":["sg-0e28306934fe7faeb"] }'

aws eks update-nodegroup-version
--cluster-name my-eks-cluster-launch-template-demo
--nodegroup-name myeks-nodegroup
--launch-template name=myeks-cluster-managednodegroup,version=4

aws ec2 create-launch-template-version
--launch-template-name myeks-cluster-managednodegroup
--version-description "Changing the instance type to t2.xlarge"
--source-version 1
--launch-template-data '{ "InstanceType":"t2.xlarge" }'

aws eks update-nodegroup-version \
--cluster-name my-eks-cluster-launch-template-demo
--nodegroup-name myeks-nodegroup
--launch-template name=myeks-cluster-managednodegroup,version=4

ecs-rds's People

Contributors

vinod827 avatar codacy-badger 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.