Stay organized with collections
Save and categorize content based on your preferences.
Name
kf logs - Show logs for an App
Synopsis
kf logs APP_NAME [flags]
Description
Logs are streamed from the Kubernetes log endpoint for each running App instance.
If App instances change or the connection to Kubernetes times out the log stream may show duplicate logs.
Logs are retained for App instances as space permits on the cluster, but will be deleted if space is low or past their retention date. Cloud Logging is a more reliable mechanism to access historical logs.
If you need logs for a particular instance use the kubectl CLI.
Examples
# Follow/tail the log stream
kf logs myapp
# Follow/tail the log stream with 20 lines of context
kf logs myapp -n 20
# Get recent logs from the App
kf logs myapp --recent
# Get the most recent 200 lines of logs from the App
kf logs myapp --recent -n 200
Flags
-h, --help
help for logs
-n, --number=int
Show the last N lines of logs. (default 10)
--recent
Dump recent logs instead of tailing.
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
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# kf logs\n\n### Name\n\n`kf logs` - Show logs for an App\n\n### Synopsis\n\n```\nkf logs APP_NAME [flags]\n```\n\n### Description\n\nLogs are streamed from the Kubernetes log endpoint for each running App instance.\n\nIf App instances change or the connection to Kubernetes times out the log stream may show duplicate logs.\n\nLogs are retained for App instances as space permits on the cluster, but will be deleted if space is low or past their retention date. Cloud Logging is a more reliable mechanism to access historical logs.\n\nIf you need logs for a particular instance use the` kubectl` CLI.\n\n### Examples\n\n```\n # Follow/tail the log stream\n kf logs myapp\n \n # Follow/tail the log stream with 20 lines of context\n kf logs myapp -n 20\n \n # Get recent logs from the App\n kf logs myapp --recent\n \n # Get the most recent 200 lines of logs from the App\n kf logs myapp --recent -n 200\n```\n\n### Flags\n\n`-h, --help`\n: help for logs\n\n`-n, --number=`\u003cvar translate=\"no\"\u003eint\u003c/var\u003e\n: Show the last N lines of logs. (default 10)\n\n`--recent`\n: Dump recent logs instead of tailing.\n\n### Inherited flags\n\nThese flags are inherited from parent commands.\n\n`--config=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n: Config file (default is $HOME/.kf)\n\n`--kubeconfig=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n: Kubectl config file (default is $HOME/.kube/config)\n\n`--log-http`\n: Log HTTP requests to stderr\n\n`--space=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n: Space to run the command against. This overrides the currently targeted space"]]