As we know, the amount of services in a k8s cluster is limited. How do we break through the limit on the number of services when we use knative to develop serverless? What I can think of is to let knative support multiple clusters, how does knative support multiple clusters?
Asked
Active
Viewed 251 times
0
-
What do you mean by "limited"? Do you mean the size of the network subnet for services? How many services do you plan on running? – Botje Nov 18 '21 at 09:53
-
Yes, It means the service nums. We plan to provide saas services, so the number of services may be infinite. But the number of services now depends on the size of the network in a k8s cluster. – BruceWu Nov 18 '21 at 09:58
-
You can have multiple kubernetes cluster each having its own Knative, then implement something like multitenant (like sharding) based on numbers users or requests to route to respective kubernetes cluster. – Narain Nov 18 '21 at 10:04
-
Realistically, Kubernetes starts creaking around the 5000-node mark. If you assume each node can host about 1000 pods and each pod is a service, you can either split the 10/8 into 10.0/9 for Pods and 10.128/9 for Services (each good for 8M entries), or you can look into co-opting the 100.64.0.0/10 block which supports 4M addresses. – Botje Nov 18 '21 at 10:04
-
what Botje says is one way to solve this problem. But it can't hold unlimited number of services. I am currently trying to develop a management server to manage knative distributed in multiple k8s clusters as Narain said. But I want to know whether there is a better solution. – BruceWu Nov 18 '21 at 11:03
1 Answers
0
I think your suggestion in the comments is the correct one: you'll want to manage multiple Kubernetes clusters, and direct your individual users to different namespaces in different clusters.
I don't know of software to do this automatically, but you could use separate DNS records for each customer to point them to their cluster once the customer has registered.

E. Anderson
- 3,405
- 1
- 16
- 19