119 points · by SoapSeller · 8y ago · 54 comments
I am curious if AWS has any plans to build an IAM integration for K8s that provides IAM credentials/roles directly to pods. An integration through EKS or K8s directly would make interacting with AWS resources very easy.
Being able to authenticate to the K8s cluster using https://github.com/kubernetes-sigs/aws-iam-authenticator is nice, but it doesn't help give pods IAM roles.
in fact, if you check out the source (located here: https://github.com/awslabs/aws-service-operator) it's recommended to use kube2iam
edit: haven't fully read the article yet but if the operator supports managing IAM roles thru a CRD you could potentially create the role and attach it via annotation in one go.
double edit: looks like IAM roles aren't directly supported yet, the following is what appears to be supported:
- cloudformation templates
- dynamodb
- s3
- sns subscriptions and topics
- sqs queues
- ecr repos
You just create a role give it an assume role policy that allows the node to assume it. Then annotate your pod w/ the role arn. When they make a call to get their instance profile you get the role instead.
It's a little annoying in that your pod code thinks its making a metadata call (which is super super fast), but what is actually happening is kube2iam intercepted that and will make a sts:assumerole call... which takes forever. So people just need to set their timeout a little higher than normal.
Full disclosure: I work on EKS at AWS
I'm sure we'll see much tighter integration over time.
(I work at AWS SSM, but not directly on the on-prem featureset.)
It seems like k8s has everything you would need to have the redundant data sources, failover, and point in time recovery options that cloudsql or auroradb have.
https://www.crunchydata.com/products/crunchy-postgresql-for-...
Service catalog is based on the open service broker spec.
[1] https://cloud.google.com/kubernetes-engine/docs/how-to/add-o...
1. https://aws.amazon.com/blogs/opensource/provision-aws-servic...
Rephrasing: AWS are smart to have a bob each way.
Jokes apart: GCP got a head start in containers thanks to Kubernetes; AWS realized it and tried to catch up. Dominating the space will have huge consequences down the road.
My humble view is that whoever starts a RedHat-like service (with support, and SLAs, and enterprise services) on top of Kubernetes, might get the upper hand. Having built Kubernetes might not be enough for GCP to maintain the lead.
Does Red Hat count as Red Hat-like? Because they've had OpenShift Origin for several years now.
I don't understand why AWS or GCP haven't added "pre-warming" requests to their cloud functions, similar to App Engine.
Think about the implications if they added a button to the lambda console to "pre-warm". There are two options: (1) set up the cloudwatch event for you (which is a similar pattern we've seen AWS use for things like DynamoDB table autoscaling), or (2) have some other internal system which can keep them warm.
Its easy to say "just do (1), it'd be so easy", but the issue is that it introduces a very weird cost pattern to lambda. Lambda isn't just billed per invocation, its billed essentially with time live. So if they auto-configure a cloudwatch event, lets say it sends an empty `{}` argument, they have no idea how long your function is designed to run given that input. Moreover, they don't even know that your function won't error with that input. So they've got this new feature and even they can't predict what it will do to your bill or system stability, given the fact that we're dealing with arbitrary code blobs.
The only option is (2). Now think about allocating engineering effort to this problem: as a manager, would you rather allocate a team to work on an extra complex scheduling parameter, or continue to improve the fundamental warm-up time for any function? Maybe both. But now you've got this extra parameter there which increases customer expectations and makes future scheduling work much more difficult.
I've said here and elsewhere before that autoscaling is easy to say and hard to do.
We keep looking to autoscalers to divine our economic preferences, which they cannot do for us. What's been missing is the ability to explicitly trade off latency for expense.
The best you can do is to a) attack startup time any how, any way possible, b) react sanely to unexpected traffic changes, c) make reasonable forecasts and d) explicitly tune cost of idleness vs cost of delay vs probability of delay. These help, but the problem will never fully go away.
(Unless you've discovered an escape hatch from either of causality or integral calculus. If you have, please share it with the class.)
Have a low latency container based API with min replicas and auto-scale, almost like an atomic CRUD API. Move as much to async serverless which is triggered on events.