For AI agents: a Markdown copy of this page is at https://paulbouwer.github.io/hello-kubernetes/docs/reference/app-settings.md. The index of every page, for the latest release, is at https://paulbouwer.github.io/hello-kubernetes/llms.txt.
App settings
The app reads its settings from environment variables. The Helm chart sets them for you from its values. Use them directly when you run the image another way: with docker run, in your own manifests, or by patching the release file with Kustomize.
| Variable | Default | What it does |
|---|---|---|
MESSAGE |
Hello world! |
The message on the page. Chart value: message. |
PORT |
8080 |
The port the app listens on. Chart value: deployment.container.port. |
HANDLER_PATH_PREFIX |
none | The path the app serves under, such as /app/hello. Set it when the proxy passes the prefix on. Chart value: pathPrefix, when rewritePath is false. |
RENDER_PATH_PREFIX |
none | The path the page’s links use, so the browser asks the proxy for the stylesheet and images under the prefix. Chart value: pathPrefix. |
KUBERNETES_NAMESPACE |
- |
The namespace shown on the page. The chart sets it from the pod. |
KUBERNETES_POD_NAME |
the host name | The pod shown on the page. The chart sets it from the pod. |
KUBERNETES_NODE_NAME |
- |
The node shown on the page, with its operating system and kernel. The chart sets it from the pod. |
CONTAINER_IMAGE |
the app’s image | The image shown on the page. Chart value: deployment.container.image.*. |
LOG_LEVEL |
info |
The log level, such as debug, info, warn or error. At debug, the app logs its settings when it starts. |
Leading and trailing slashes in the two path prefixes are optional. The page also shows the image’s architecture, such as linux/amd64, which the app reads from itself.
The pod details
Section titled “The pod details”The chart sets the three KUBERNETES_ variables with the Downward API. In your own manifest:
env: - name: KUBERNETES_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: KUBERNETES_POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: KUBERNETES_NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeNameRun it with Docker
Section titled “Run it with Docker”docker run --rm -p 8080:8080 -e MESSAGE="Hello from Docker" paulbouwer/hello-kubernetes:1.11.0Open http://localhost:8080/. You see Hello from Docker, with - for the namespace and node, and the container ID as the pod. Press Ctrl+C to stop.
What the app serves
Section titled “What the app serves”| Path | What |
|---|---|
/ |
The page. Under a prefix, <prefix>/. |
/css/, /images/, /fonts/, /favicon.ico |
The stylesheet, the logo, the Ubuntu font and its licence, and the icon. |
There is no separate health endpoint. The chart’s probes ask for the page.