Slide 1

Slide 1 text

© 2022, Amazon Web Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. EKS BlueprintsでEKSと運用に必要な ツールをまるっとデプロイ! 堀内 保大 AWS Japan G.K.

Slide 2

Slide 2 text

© 2022, Amazon Web Services, Inc. or its affiliates. 自己紹介 堀内 保大 (Yasuhiro Horiuchi) • Solutions Architect, DNB-IM • コンテナ 好きなAWSサービス コンテナ関連が好きです!! • Amazon Elastic Kubernetes Service (EKS) • AWS Fargate • Amazon Managed Service for Prometheus (AMP) 趣味 • キングダムのアニメ→馬の削蹄の動画を見ること 2 @ka_shino_ki [email protected]

Slide 3

Slide 3 text

© 2022, Amazon Web Services, Inc. or its affiliates. Kubernetesを導入することに決めました • 大規模なコンテナワークロードの 基盤としてKubernetesを採用 • できるだけベストプラクティスに 則ってアドオンやツールを入れて いきたい • さあ、がんばるぞぉ 3

Slide 4

Slide 4 text

© 2022, Amazon Web Services, Inc. or its affiliates. Using secured, scalable and managed service VPC AWS Cloud Availability Zone 1 Availability Zone 2 Amazon EKS VPC、サブネットの用意

Slide 5

Slide 5 text

© 2022, Amazon Web Services, Inc. or its affiliates. Managing data plane VPC AWS Cloud Availability Zone 1 Availability Zone 2 Amazon EKS Managed Node Group Managed Node Group データプレーン (Managed Node Group, Fargate) Auto Scaling (Karpenter, KEDA)

Slide 6

Slide 6 text

© 2022, Amazon Web Services, Inc. or its affiliates. Cluster add-ons VPC AWS Cloud Availability Zone 1 Availability Zone 2 Amazon EKS Managed Node Group AWS Load Balancer Controller Amazon CloudWatch AWS X-Ray ArgoCD Nginx CoreDNS Cluster Autoscaler External DNS Fluent Bit Kube-proxy VPC CNI アドオン (VPC CNI, EBS CSI, ADOT etc)や、Ingress Contoroler (AWS LoadBalancer Controller)

Slide 7

Slide 7 text

© 2022, Amazon Web Services, Inc. or its affiliates. Access permission management Developer Role Developer Platform team Developer Temporary User Platform Role アクセス権限管理 (aws-auth, IRSA)

Slide 8

Slide 8 text

© 2022, Amazon Web Services, Inc. or its affiliates. Pipeline AWS CodePipeline Pipeline Dev/Test account (single/multiple regions) Production account Dev environment Test environment Production environment Pipeline, GitOps

Slide 9

Slide 9 text

© 2022, Amazon Web Services, Inc. or its affiliates. なんか設定するもの多くない? 9

Slide 10

Slide 10 text

© 2022, Amazon Web Services, Inc. or its affiliates. そんなときに EKS Blueprints • EKS の導入をより簡単かつ迅速にする新 しいオープンソースプロジェクト • IaC モジュールのコレクション • HashiCorp Terraform と AWS CDK で実装 • 各アドオンはアップストリームの Helm チャートリポジトリを指しており、 チャートの values をカスタマイズするこ とも可能 10

Slide 11

Slide 11 text

© 2022, Amazon Web Services, Inc. or its affiliates. CDK の例 12 import 'source-map-support/register'; import * as cdk from 'aws-cdk-lib'; import * as blueprints from '@aws-quickstart/eks-blueprints'; const app = new cdk.App(); // AddOns for the cluster. const addOns: Array = [ new blueprints.addons.ArgoCDAddOn, new blueprints.addons.CalicoAddOn, new blueprints.addons.MetricsServerAddOn, new blueprints.addons.ClusterAutoScalerAddOn, new blueprints.addons.ContainerInsightsAddOn, new blueprints.addons.AwsLoadBalancerControllerAddOn(), new blueprints.addons.VpcCniAddOn(), new blueprints.addons.CoreDnsAddOn(), new blueprints.addons.KubeProxyAddOn(), new blueprints.addons.XrayAddOn() ]; const account = 'XXXXXXXXXXXXX' const region = 'us-east-2' const props = { env: { account, region } } new blueprints.EksBlueprint(app, { id: 'east-test-1', addOns}, props) たったこれだけのコードで、各種アドオンが入ったEKSのクラスタ環境ができあがる

Slide 12

Slide 12 text

© 2022, Amazon Web Services, Inc. or its affiliates. デフォルトでできるもの 13

Slide 13

Slide 13 text

© 2022, Amazon Web Services, Inc. or its affiliates. デフォルトでできるもの 14

Slide 14

Slide 14 text

© 2022, Amazon Web Services, Inc. or its affiliates. デフォルトでできるもの 15 Namespace Helm CRD 例えば、、

Slide 15

Slide 15 text

© 2022, Amazon Web Services, Inc. or its affiliates. さらに、なにができるか • CDKやTerraformにてアドオンの更新の追加/削除が可能 • アプリのデプロイはArgoCDですぐにGitOpsを開始可能 • K8s環境へのアクセス制御 ▪ Teamという概念で設定が可能(PlatfromTeamとApplicationTeamのデフォ ルト権限があり、容易に設定が可能) • ノードグループの設定 ▪ Cluster Providersの設定にて、MNGやFargateの環境を容易に設定可能 • 大量のアドオンサポート 17

Slide 16

Slide 16 text

© 2022, Amazon Web Services, Inc. or its affiliates. アドオン 18

Slide 17

Slide 17 text

© 2022, Amazon Web Services, Inc. or its affiliates. Next Step • 紹介ブログ ▪ https://aws.amazon.com/jp/blogs/news/bootstrapping-clusters-with-eks- blueprints/ • EKS Blueprints for CDK ドキュメント ▪ https://aws-quickstart.github.io/cdk-eks-blueprints/ • EKS Blueprints for Terraform ドキュメント ▪ https://aws-ia.github.io/terraform-aws-eks-blueprints/v4.12.1/ 19

Slide 18

Slide 18 text

© 2022, Amazon Web Services, Inc. or its affiliates. Thank you! © 2022, Amazon Web Services, Inc. or its affiliates.