aws-samples / eks-workshop

AWS Workshop for Learning EKS
https://eksworkshop.com
MIT No Attribution
803 stars 1.24k forks source link

Re-implement with CDK #1162

Closed briancaffey closed 1 year ago

briancaffey commented 3 years ago

It would be great if this project could be re-implemented with AWS CDK. This would help with reproducibility and clarity. Are there any plans to do this?

joebowbeer commented 3 years ago

@briancaffey cdk8s? Or is cdk8s now a subset of CDK?

The more eksworkshop can leverage standard tooling that is applicable across clusters, the more it interests me, though I can imagine other audiences coming from a different direction that might have different preferences.

Those who buy into GitOps and its expanding reach will be looking for even more declarative representations that can be managed by k8s controllers. (Think ACK and Argo or Flow.) The growth of GitOps doesn't bode well for CDK.

briancaffey commented 3 years ago

@joebowbeer Thanks for your reply. I think it would be most helpful to have an implementation in CDK, but this could possibly use cdk8s. cdk8s constructs can be used in CDK to define manifests for EKS and CDK can be used in cdk8s constructs (for example, see this project https://github.com/neilkuan/cdk8s-aws-load-balancer-controller).

After opening this issue I also came across https://github.com/aws-samples/eks-workshop/pull/1119 which has some additional discussion about this. I think the EKS workshop is great, but if CDK can help us do more with less aws/eksctl commands that are more error prone, then I think it would be very helpful.

Those who buy into GitOps and its expanding reach will be looking for even more declarative representations that can be managed by k8s controllers

I wasn't sure what you meant by this, but looking into ACK I think what you are saying is that a kubernetes/EKS cluster can be what provisions AWS resources instead of CDK/CloudFormation.

For context, I'm used to working with pretty simple applications that use ECS, ALB, S3, RDS, ElastiCache for web services (mostly Django), and I'm very happy using CDK for this. I'm trying to replicate my application architecture with EKS in place of CDK. Here's a WIP progress repo that I'm working on related to this: https://github.com/briancaffey/django-cdk. My goal is to have high-level constructs for ECS and EKS that can deploy my Django application with all of the related AWS services it needs. That's why I was hoping that the EKS workshop could show a setup for a basic application using CDK/IaC.

The growth of GitOps doesn't bode well for CDK.

I think most CDK people would disagree, using GitOps workflows with CDK seems to be a popular pattern, and it has worked well for me in previous projects. Could you elaborate on why you think that?

joebowbeer commented 3 years ago

@briancaffey regarding CDK's suitability for GitOps, I think the assessment depends on your definition of GitOps.

In "weak" GitOps, which is solely "operations by pull request", CDK seems fairly suitable.

I think CDK is a more difficult fit in "strong" GitOps, which, in addition to operations by pull request also leverages k8s operators/controllers such as Flux's GitOps operator and Amazon's controllers (ACK). The GitOps operators reconcile the cluster state with the desired state stored in git. The desired state is periodically synced to an in-cluster clone of the repo.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.