Skip to content

Commit a502868

Browse files
authored
Merge pull request #27996 from chaitanyaenr/services_per_ns_limit
Add recommendation around service name impacting the pods
2 parents d220490 + 593b5ca commit a502868

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

modules/how-to-plan-your-environment-according-to-application-requirements.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,20 @@ links in the deployment's service specification file to overcome this:
167167
labels:
168168
template: deploymentConfigTemplate
169169
----
170+
171+
The number of application pods that can run in a namespace is dependent on the number of services and the
172+
length of the service name when the environment variables are used for service discovery. `ARG_MAX` on the system
173+
defines the maximum argument length for a new process and it is set to `2097152 KiB` by default. The Kubelet injects
174+
environment variables in to each pod scheduled to run in the namespace including:
175+
176+
* `<SERVICE_NAME>_SERVICE_HOST=<IP>`
177+
* `<SERVICE_NAME>_SERVICE_PORT=<PORT>`
178+
* `<SERVICE_NAME>_PORT=tcp://<IP>:<PORT>`
179+
* `<SERVICE_NAME>_PORT_<PORT>_TCP=tcp://<IP>:<PORT>`
180+
* `<SERVICE_NAME>_PORT_<PORT>_TCP_PROTO=tcp`
181+
* `<SERVICE_NAME>_PORT_<PORT>_TCP_PORT=<PORT>`
182+
* `<SERVICE_NAME>_PORT_<PORT>_TCP_ADDR=<ADDR>`
183+
184+
The pods in the namespace will start to fail if the argument length exceeds the allowed value and the number of
185+
characters in a service name impacts it. For example, in a namespace with 5000 services, the limit on the service name
186+
is 33 characters, which enables you to run 5000 pods in the namespace.

0 commit comments

Comments
 (0)