by mattnewton · 3y ago · 0 comments
There is some up front work of course, but there's a ton of cloud provider-agnostic library tooling out there these days that you can use to build something like autoscaling (pulumi, terraform, et al.). You might not end up with full feature parity of what k8s offers, but you'd get 90% of the way there.
Kubernetes, in and of itself, only makes a few core things somewhat cloud agnostic (compute, LBs, and volumes). You can use those primitives to run cloud-agnostic alternatives to managed services within your cluster, but for most startups that's going to be a premature optimization.
But k8s isn't cloud agnostic either, at least not if you hold it to the same standard that you're holding pulumi/terraform.
Many of the lower level native abstractions, like CNI plugins, aren't 100% interchangeable and don't always just work depending on your use case. There's a reason AWS had to build its own VPC CNI plugin to get EKS fully functional across all of its networking services (particularly any service involving peering like DirectConnect etc).
If you have to think about it, chances are you don't need it. It's often the case about a lot of optimizations. I've had clients ask for help sharding their database, when that's almost never the correct course of action.
Much simpler than setting up K8s with scale-to-zero autoscaling nodegroups.
Sure, Kubernetes gives you some independence but then you still depend on a lot of vendor specific services like S3, RDS, SES, SQS, etc.
Sure, you don't have to but that is the whole point of Clouds.
Otherwise, using regular old-school hosting providers is much, much cheaper.
> and there are some abstraction you can do to make things portable.
I would disagree with this point.
I'm sure that there are some APIs that try to abstract out the Cloud service used but in the end you are tied to the pricing and technical specificities of each service.
If I want to use a file storage service, I need to know how to authenticate to it, handle the access control, host static sites with it, handle CDN integration, configure access logging, etc.
All of this is possible in multiple cloud services but will be different for each provider. That is sufficient enough for it to be a leaky abstraction.
> in the end you are tied to the pricing and technical specificities of each service.
That's one of the primary driving factors behind our decision to design our application to be portable.
The point of Cloud Services is to provide all these additional services.
If you don't use those services then the flexibility is relatively trivial to achieve.
In this case, you're just standing up normal servers in the cloud, which is pretty trivial in all of the major clouds' terraform providers. As long as the OS on the servers is standard (say, CentOS or ubuntu), your Config as Code stack (think ansible/puppet) won't really care which cloud provider you're using.
If they need to scale, they can add in another server to their infra as code, and make sure the config as code can handle more than one server. Not really that difficult with a little experience with terraform and ansible. There's also room for Auto scaling groups, which all of the major cloud providers support as well.