Skip to content

Commit 5c93a6c

Browse files
authored
Add environment variable example to host ports.
1 parent 18082d1 commit 5c93a6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/aks/use-node-public-ips.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ az provider register --namespace Microsoft.ContainerService
260260

261261
Triggering host port auto assignment is done by deploying a workload without any host ports and applying the `kubernetes.azure.com/assign-hostports-for-containerports` annotation with the list of ports that need host port assignments. The value of the annotation should be specified as a comma-separated list of entries like `port/protocol`, where the port is an individual port number that is defined in the Pod spec and the protocol is `tcp` or `udp`.
262262

263-
Ports will be assigned from the range `40000-59999` and will be unique across the cluster. The assigned ports will also be added to environment variables inside the pod so that the application can determine what ports were assigned.
263+
Ports will be assigned from the range `40000-59999` and will be unique across the cluster. The assigned ports will also be added to environment variables inside the pod so that the application can determine what ports were assigned. The environment variable name will be in the following format (example below): `<deployment name>_PORT_<port number>_<protocol>_HOSTPORT`, so an example would be `mydeployment_PORT_8080_TCP_HOSTPORT: 41932`.
264264

265265
Here is an example `echoserver` deployment, showing the mapping of host ports for ports 8080 and 8443:
266266

0 commit comments

Comments
 (0)