- Best place to get started
- https://eksworkshop.com/
- Talk Minikube
- Talk Play with Kubernetes
- https://labs.play-with-k8s.com/
- EKS Service Role
- Create EKS Cluster (with same user who will use kubectl)
- Talk about IAM and K8s RBAC
- What is kubectl?
- Use AWS CLI to update kubeconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Threading.Tasks; | |
| using Amazon.SQS; | |
| using Amazon.SQS.Model; | |
| using Newtonsoft.Json; | |
| using SQSConsumer.Models; | |
| using Amazon.SimpleSystemsManagement; | |
| using Amazon.SimpleSystemsManagement.Model; | |
| using System.Collections.Generic; | |
| using Amazon.DynamoDBv2.DataModel; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: gremlin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWSTemplateFormatVersion: "2010-09-09" | |
| Description: >- | |
| EKS for us-east-1 with Kubernetes Object deployment support. | |
| Resources: | |
| ##### START VPC RESOURCES ##### | |
| VPC: | |
| Type: AWS::EC2::VPC | |
| Properties: | |
| CidrBlock: 10.0.0.0/16 | |
| InstanceTenancy: default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: sock-shop | |
| --- | |
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: carts-db |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| labels: | |
| k8s-addon: cluster-autoscaler.addons.k8s.io | |
| k8s-app: cluster-autoscaler | |
| name: cluster-autoscaler | |
| namespace: kube-system | |
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| helm init --service-account tiller | |
| helm repo add gremlin https://helm.gremlin.com | |
| # Under the Configurations tab, download and copy your Gremin Certificates key and cert onto the EC2 bastion host. | |
| # Be sure to name your files gremlin.cert and gremlin.key. | |
| # See this documentation for more info on retrieving the Gremlin Certificates: | |
| # https://www.gremlin.com/docs/infrastructure-layer/authentication/#downloading-the-certificate | |
| # You can alternatively use vim | |
| nano gremlin.cert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws ec2 describe-regions --query 'Regions[?RegionName != `ap-east-1`]|[?RegionName != `ap-northeast-3`].[RegionName]' --output text | \ | |
| xargs -n1 -I{} sh -c 'aws lambda list-functions --region {} --query '"'"'Functions[?starts_with(Runtime, `nodejs8`) == `true`].[FunctionName]'"'"' --output text' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws s3api list-buckets --query "Buckets[].Name" --output text | \ | |
| xargs -n1 -I{} sh -c 'aws s3api get-bucket-location --bucket {} --output text | xargs -n1 -I@ echo {} @' | \ | |
| xargs -n2 sh -c 'if [ $1 == "None" ]; then echo $0 - us-east-1 ; else echo $0 - $1 ; fi' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text) | |
| EVENT_SOURCE_NAME=$(aws events list-event-sources --query 'EventSources[?CreatedBy == `aws.partner/auth0.com`]|[0].Name' --output text) | |
| RULE_NAME=auth0 | |
| FUNCTION_NAME=Auth0Logs | |
| aws events create-event-bus --name $EVENT_SOURCE_NAME --event-source-name $EVENT_SOURCE_NAME | |
| EVENT_PATTERN=$(jq -r .EventPattern event-pattern.json | jq --arg ACCOUNT "$ACCOUNT_ID" '.account = $ACCOUNT' | jq 'tostring') |