Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K8s Environment Detection #42

Open
jaredcnance opened this issue May 23, 2020 · 1 comment
Open

K8s Environment Detection #42

jaredcnance opened this issue May 23, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@jaredcnance
Copy link
Member

jaredcnance commented May 23, 2020

https://kubernetes.io/docs/concepts/services-networking/service/#discovering-services

Example environment variables for an eks pod named eks-demo.

  KUBERNETES_SERVICE_PORT: '443',
  KUBERNETES_PORT: 'tcp://10.100.0.1:443',
  EKS_DEMO_PORT_80_TCP_PORT: '80',
  NODE_VERSION: '10.16.0',
  HOSTNAME: 'eks-demo-55f57f865b-l7tcs',
  EKS_DEMO_PORT_80_TCP_PROTO: 'tcp',
  YARN_VERSION: '1.16.0',
  SHLVL: '1',
  HOME: '/root',
  EKS_DEMO_PORT_80_TCP: 'tcp://10.100.122.110:80',
  AWS_EMF_ENABLE_DEBUG_LOGGING: 'true',
  KUBERNETES_PORT_443_TCP_ADDR: '10.100.0.1',
  PATH:
   '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
  AWS_EMF_AGENT_ENDPOINT: 'tcp://127.0.0.1:25888',
  KUBERNETES_PORT_443_TCP_PORT: '443',
  KUBERNETES_PORT_443_TCP_PROTO: 'tcp',
  EKS_DEMO_SERVICE_HOST: '10.100.122.110',
  KUBERNETES_PORT_443_TCP: 'tcp://10.100.0.1:443',
  KUBERNETES_SERVICE_PORT_HTTPS: '443',
  KUBERNETES_SERVICE_HOST: '10.100.0.1',
  EKS_DEMO_SERVICE_PORT: '80',
  EKS_DEMO_PORT: 'tcp://10.100.122.110:80',
  PWD: '/app/src'
@jaredcnance jaredcnance added the enhancement New feature or request label May 23, 2020
@jaredcnance
Copy link
Member Author

It looks like the only way to do env detection is through the downward API. We can provide an example that sets the library variables but doing this automatically does not appear to be possible yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant