Skip to content

Commit 593b5ca

Browse files
committed
Add recommendation around service name impacting the pods
This length of the service name impacts the number of pods that can run in a namespace with maximum number of services tested deployed - 5000. This commit adds a recommendation for the user to be able to plan their applications accordingly.
1 parent dbf1caf commit 593b5ca

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)