containers - What environment variables are created in kubernetes by default -


i can't find in k8s documentation, i'm wondering default environment variables created in every container k8s. not user created defaults, (and example) maybe {service_name}_port or that. wanna know information available in container default.

from k8s documentation;

container information - env's

the hostname of container name of pod in container running. available through hostname command or gethostname function call in libc.

the pod name , namespace available environment variables.

these additional env's in minikube cluster have running:

hostname=something-api-234234234-skm70 shlvl=1 home=/root path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin kubernetes_service_port_https=443 kubernetes_service_host=x.x.x.x pwd=/ 

user defined environment variables pod definition available container, environment variables specified statically in docker image.

cluster information - env's

a list of services running when container created available container environment variables. environment variables match syntax of docker links.

for service named foo maps container port named bar, following variables defined:

foo_service_host=<the host service running on> foo_service_port=<the port service running on> 

ref: https://kubernetes.io/docs/concepts/containers/container-environment-variables/


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -