OperationCode / operationcode_infra

Platform infrastructure for the Operation Code site.
MIT License
15 stars 14 forks source link

Rework Kubernetes deployment to use EKS+fargate for everything #143

Closed irvingpop closed 4 years ago

irvingpop commented 4 years ago

Problem: Our current Kubernetes cluster is too expensive to run and also has manageability challenges.

This PR's goal is to fully document the new operationcode-backend EKS cluster, so that it can be rebuilt if there's ever a need. Nearly everything runs "serverless" via Fargate, which should save a considerable amount of money. The only exception is ArgoCD, which requires persistent volumes, must run on an EC2 node.

Add configs for:

Remove:

Rework:

Fixes: #138 Fixes: #139

Signed-off-by: Irving Popovetsky irving@honeycomb.io

kylemh commented 4 years ago

i am out of my depth on this one, @irvingpop - sorry!

irvingpop commented 4 years ago

one thought, regarding the infrastructure node. Because of CNI limitations a t3a.small is limited to 8 pods total and is already at 7 out of 8 just running ArgoCD.

a t3.small is slightly more expensive but can run 12 pods if we ever need to run another persistent service. There doesn't appear to be a way to split a namespace between fargate and EC2 nodes, it's all-or-nothing

irvingpop commented 4 years ago

Update: So that the kops cluster isn't impacted, I've created a kops_stable branch in this repo and pointed all the deployments in the ArgoCD instance on kops at that branch. Pretty sure this should be safe to merge now.

AllenAnthes commented 4 years ago

one thought, regarding the infrastructure node. Because of CNI limitations a t3a.small is limited to 8 pods total and is already at 7 out of 8 just running ArgoCD.

a t3.small is slightly more expensive but can run 12 pods if we ever need to run another persistent service. There doesn't appear to be a way to split a namespace between fargate and EC2 nodes, it's all-or-nothing

It's a difference of like $2 a month. I say just go for it.