Giter VIP home page Giter VIP logo

iac-lab's Introduction

IAC lab

Preliminary step: generate SSH key and upload it to AWS

ssh-keygen -t rsa -b 4096 -C "awskey" -N "" -f awskey
aws ec2 import-key-pair --key-name "awskey" --public-key-material "$(base64 -i awskey.pub)"

Running all tasks

bash ./run.sh

Troubleshooting

Create cloud formation template

aws cloudformation create-stack --stack-name demo-stack-1 --template-body file://infra.yaml --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM

Update stack

aws cloudformation update-stack --stack-name demo-stack-1 --template-body file://infra.yaml --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM

Remove stack

aws cloudformation delete-stack --stack-name demo-stack-1

View EKS cluster

aws cloudformation describe-stacks --stack-name demo-stack-1 | jq '.Stacks[0].Outputs'

Get kubeconfig

aws eks update-kubeconfig --name demo-stack-1-eks-cluster --region eu-central-1
kubectl cluster-info
kubectl get pods --all-namespaces

Save python script as configmap

kubectl create configmap python-script --from-file=cronjob.py
kubectl describe configmap python-script
kubectl delete configmap python-script
kubectl run my-shell --rm -i --tty --image python:slim -- bash

iac-lab's People

Contributors

stremovsky 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.