[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# App Runtime\n\nThe app runtime is the environment apps are executed in.\n\nEnvironment variables\n---------------------\n\nEnvironment variables are injected into the app at runtime by Kubernetes.\nVariables are added based on the following order, where later values override\nearlier ones with the same name:\n\n1. Space (set by administrators)\n2. App (set by developers)\n3. System (set by Kf)\n\nKf provides the following system environment variables:\n\nService credentials from bound services get injected into Apps via the\n`VCAP_SERVICES` environment variable. The variable is a valid JSON object with\nthe following structure.\n\n### VCAPServices\n\nA JSON object where the keys are Service labels and the values are an array of\n`VCAPService`. The array represents every bound\nservice with that label.\n[User provided services](../concepts/user-provided-services)\nare placed under the label `user-provided`.\n\n**Example** \n\n {\n \"mysql\": [...],\n \"postgresql\": [...],\n \"user-provided\": [...]\n }\n\n### VCAPService\n\nThis type represents a single bound service instance.\n\n**Example** \n\n {\n \"binding_name\": string,\n \"instance_name\": string,\n \"name\": string,\n \"label\": string,\n \"tags\": string[],\n \"plan\": string,\n \"credentials\": object\n }\n\n**Fields**\n\n| **Note:** Use the `tags` field to discover services in your App rather than filtering by plan/label so you can swap implementations and providers per environment.\n| **Note:** The `credentials` field is *often* an object with string keys and values. However, the values are allowed to be [any type](https://github.com/openservicebrokerapi/servicebroker/blob/v2.15/spec.md#body-9).\n\n### VCAP_APPLICATION\n\nThe`VCAP_APPLICATION` environment variable is a JSON object containing metadata about the App.\n\n**Example** \n\n {\n \"application_id\": \"12345\",\n \"application_name\": \"my-app\",\n \"application_uris\": [\"my-app.example.com\"],\n \"limits\": {\n \"disk\": 1024,\n \"mem\": 256\n },\n \"name\": \"my-app\",\n \"process_id\": \"12345\",\n \"process_type\": \"web\",\n \"space_name\": \"my-ns\",\n \"uris\": [\"my-app.example.com\"]\n }\n\n**Fields**\n\n**Missing Fields**\n\nSome fields in `VCAP_APPLICATION` that are in Cloud Foundry are currently not supported in Kf.\n\nBesides CF-specific and deprecated fields (`cf_api`, `host`, `users`) the fields that are not supported in Kf are:\n\n- `application_version` (identical to `version`)\n- `organization_id`\n- `organization_name`\n- `space_id`\n- `start` (identical to `started_at`)\n- `started_at_timestamp` (identical to `state_timestamp`)"]]