knative / knative/serving

Theoretical maximum number of Knative Services for a single cluster

Open
#13,201 17 comments 0 reactions 1 assignee View on GitHub

@dprotaso is already working on this.

Since Apr 18, 2025.

kind/question lifecycle/frozen triage/accepted
Dominant language
Go
Stars
6.1k
Forks
1.2k
Avg merge
2d 7h
Merged PRs (30d)
2

Description

Ask your question here:

According to Kubernetes Scalability thresholds there is an upper limit for the number of Kubernetes Services that is based on the maximum number of iptable entries on a node. Currently, this limit is at 10000 services (if I understand correctly, this is independent of the number of nodes in a cluster since every node needs to have the same iptables routing).

Since every Knative service translates at a minimum to 3 Kubernetes services (1 ExternalName service pointing to the ingress gateway, and 2 services for each revision (public/private), the theoretical maximum of Knative Services in a cluster would be ~ 3350 Knative services (and much less if using multiple revisions and/or other workloads on this cluster beside Knative).

My questions would be:

  • Is this assumption (3350 KServices per cluster) a fair one ?
  • Isn't this limitation very severe for a serverless model where potentially many KService is scaled to zero but still occupy iptable entries? So it could be that you have an empty cluster (everything scaled to zero), but your routing tables are still exhausted ?
  • Would it be a desiarable goal to reduce the number of Kubernetes Services attached to a Knative Service? (like down to 1:1) ?
  • Is there a way to circumvent the iptables limitation? (by maybe using a different tech for service mapping)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.