kf env

Name

kf env - Print information about an App's environment variables

Synopsis

kf env APP_NAME [flags]

Description

The env command gets the names and values of developer managed environment variables for an App.

Environment variables are evaluated in the following order with later values overriding earlier ones with the same name:

  1. Space (set by administrators)
  2. App (set by developers)
  3. System (set by Kf) Environment variables containing variable substitution "$(...)" are replaced at runtime by Kubernetes. Kf provides the following runtime environment variables:
  • CF_INSTANCE_ADDR: The cluster-visible IP:PORT of the App instance.
  • CF_INSTANCE_GUID: The UUID of the App instance.
  • INSTANCE_GUID: Alias of CF_INSTANCE_GUID
  • CF_INSTANCE_INDEX: The index number of the App instance, this will ALWAYS be 0.
  • INSTANCE_INDEX: Alias of CF_INSTANCE_INDEX
  • CF_INSTANCE_IP: The cluster-visible IP of the App instance.
  • CF_INSTANCE_INTERNAL_IP: Alias of CF_INSTANCE_IP
  • VCAP_APP_HOST: Alias of CF_INSTANCE_IP
  • CF_INSTANCE_PORT: The cluster-visible port of the App instance. In Kf this is the same as PORT.
  • DATABASE_URL: The first URI found in a VCAP_SERVICES credential.
  • DISK_LIMIT: The maximum amount of disk storage in MB the App can use.
  • LANG: Required by buildpacks to ensure consistent script load order.
  • MEMORY_LIMIT: The maximum amount of memory in MB the App can consume.
  • PORT: The port the App should listen on for requests.
  • VCAP_APP_PORT: Alias of PORT
  • VCAP_APPLICATION: A JSON structure containing app metadata.
  • VCAP_SERVICES: A JSON structure specifying bound services.

Examples

  kf env myapp

Flags

-h, --help
help for env

Inherited flags

These flags are inherited from parent commands.

--config=string
Config file (default is $HOME/.kf)
--kubeconfig=string
Kubectl config file (default is $HOME/.kube/config)
--log-http
Log HTTP requests to stderr
--space=string
Space to run the command against. This overrides the currently targeted space