Scaling Kubernetes to Thousands of CRDs
blog.upbound.io
blog.upbound.io
I am excited about crossplane because handling infrastructure via a reconciliation loop addresses most of my problems with terraform. Namely, managing/sharing a state file, importing resources that already exist, and ensuring that reality doesn't drift from terraform state.
Naively, if I just look at the raw CRD diff, that information won't be apparent.
FWIW though we never automatically delete-and-recreate in Terraform fashion. Our thinking is that once Kubernetes supports it (or once we build an admission control webhook for it) we'd like to explicitly mark immutable fields as such, which would require you to explicitly delete-then-recreate. Little bit less declarative at the expense of being a lot less surprising given the constantly reconciling nature of our system.
Yeah, that's the limitation of hosted kubernetes services. Internally we used crossplane a lot. Though we haven't reached this limitation yet, we used another approach by deploying a standalone etcd + k8s apiserver as k8s (eks/gke) pods. And register the CRDs into this apiserver. So we can scale the etcd and apiserver easily.
As far as I understand, use cases for Crossplane - it supposed to be used together with CD systems, such as ArgoCD. ArgoCD on its own add quite a lot of CRDs to cluster, so the problem highlighted in the article is very relevant to heavy used clusters
I wouldn't say Crossplane is _supposed_ to be used together with CD systems (that's optional) but that's certainly a common and practical use case.
Even though the FAQ says that Config Connector isn't OSS, it is now: https://github.com/GoogleCloudPlatform/k8s-config-connector
From the post it seems like interacting with Crossplane Managed Resources is done via a simplified "userspace" CRD/controller and not directly. Is direct interaction a Crossplane anti-pattern? It seems like both approaches have their own advantages.
So while I can get behind this sentiment philosophically, until something changes upstream in kubernetes, this makes it really difficult to use crossplane in a cluster used for anything else and it probably makes sense to offer a workaround until then. Also, in practice, any security conscious users running crossplane in production are probably going to give it AWS credentials scoped to only the resources they want to allow it to manage, so even if you do install all of the CRDs in the cluster, 90% of them won't work due to their AWS credentials anyway.
I can not recall the name of the project. Would love to see whether this idea got any traction. Sounds like it would be a nice fit for a crossplane maintained infrastructure.
https://github.com/kcp-dev/kcp https://www.youtube.com/watch?v=oaPBYUfdFE8
The team is developing the idea and has made a lot of progress. Fair warning, some of the recent progress is not accurately represented in the demos / docs.
I think the ideas behind kcp, along with this work from crossplane, is a great example of the Kube ecosystem exploring new opportunities (also vcluster and cluster api nested). Infrastructure control planes have a lot of potential advantages for streamlining complex environments for consumers.
edit: This work from crossplane is awesome because it benefits kcp which is trying to hit that next level (an example of giving back that benefits everyone)