This is the multi-page printable view of this section. Click here to print.
Kf CLI Reference
- 1: kf about
- 2: kf app
- 3: kf apps
- 4: kf bind-route-service
- 5: kf bind-service
- 6: kf bindings
- 7: kf build
- 8: kf build-logs
- 9: kf buildpacks
- 10: kf builds
- 11: kf configure-cluster
- 12: kf configure-cluster get-feature-flags
- 13: kf configure-cluster set-feature-flag
- 14: kf configure-cluster unset-feature-flag
- 15: kf configure-space
- 16: kf configure-space append-domain
- 17: kf configure-space get-build-service-account
- 18: kf configure-space get-buildpack-env
- 19: kf configure-space get-container-registry
- 20: kf configure-space get-domains
- 21: kf configure-space get-execution-env
- 22: kf configure-space get-nodeselector
- 23: kf configure-space remove-domain
- 24: kf configure-space set-app-egress-policy
- 25: kf configure-space set-app-ingress-policy
- 26: kf configure-space set-build-egress-policy
- 27: kf configure-space set-build-ingress-policy
- 28: kf configure-space set-build-service-account
- 29: kf configure-space set-buildpack-env
- 30: kf configure-space set-container-registry
- 31: kf configure-space set-default-domain
- 32: kf configure-space set-env
- 33: kf configure-space set-nodeselector
- 34: kf configure-space unset-buildpack-env
- 35: kf configure-space unset-env
- 36: kf configure-space unset-nodeselector
- 37: kf create-autoscaling-rule
- 38: kf create-job
- 39: kf create-route
- 40: kf create-service
- 41: kf create-service-broker
- 42: kf create-space
- 43: kf create-user-provided-service
- 44: kf debug
- 45: kf delete
- 46: kf delete-autoscaling-rules
- 47: kf delete-job
- 48: kf delete-job-schedule
- 49: kf delete-network-policy
- 50: kf delete-orphaned-routes
- 51: kf delete-route
- 52: kf delete-service
- 53: kf delete-service-broker
- 54: kf delete-space
- 55: kf disable-autoscaling
- 56: kf doctor
- 57: kf domains
- 58: kf enable-autoscaling
- 59: kf env
- 60: kf fix-orphaned-bindings
- 61: kf job-history
- 62: kf job-schedules
- 63: kf jobs
- 64: kf logs
- 65: kf map-route
- 66: kf marketplace
- 67: kf network-policies
- 68: kf network-policy
- 69: kf proxy
- 70: kf proxy-route
- 71: kf push
- 72: kf restage
- 73: kf restart
- 74: kf routes
- 75: kf run-job
- 76: kf run-task
- 77: kf scale
- 78: kf schedule-job
- 79: kf service
- 80: kf services
- 81: kf set-env
- 82: kf set-space-role
- 83: kf space
- 84: kf space-users
- 85: kf spaces
- 86: kf ssh
- 87: kf stacks
- 88: kf start
- 89: kf stop
- 90: kf target
- 91: kf tasks
- 92: kf terminate-task
- 93: kf unbind-route-service
- 94: kf unbind-service
- 95: kf unmap-route
- 96: kf unset-env
- 97: kf unset-space-role
- 98: kf update-autoscaling-limits
- 99: kf update-user-provided-service
- 100: kf vcap-services
- 101: kf version
- 102: kf wrap-v2-buildpack
- 103: kf xargs-apps
1 - kf about
Name
kf about
- Print information about Kf’s terms of service.
Synopsis
kf about [flags]
Examples
kf about
Flags
-h, --help
help for about
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
2 - kf app
Name
kf app
- Print information about the given App.
Synopsis
kf app NAME [flags]
Examples
kf app my-app
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for app
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
3 - kf apps
Name
kf apps
- List Apps in the targeted Space.
Synopsis
kf apps [flags]
Examples
kf apps
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for apps
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
4 - kf bind-route-service
Name
kf bind-route-service
- Bind a route service instance to an HTTP route.
Synopsis
kf bind-route-service DOMAIN [--hostname HOSTNAME] [--path PATH] SERVICE_INSTANCE [-c PARAMETERS_AS_JSON] [flags]
Description
PREVIEW: this feature is not ready for production use. Binding a service to an HTTP route causes traffic to be processed by that service before the requests are forwarded to the route.
Examples
kf bind-route-service company.com --hostname myapp --path mypath myauthservice
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for bind-route-service
--hostname=string
Hostname for the Route.
-c, --parameters=string
JSON object or path to a JSON file containing configuration parameters. (default "{}")
--path=string
URL path for the Route.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
5 - kf bind-service
Name
kf bind-service
- Grant an App access to a service instance.
Synopsis
kf bind-service APP_NAME SERVICE_INSTANCE [-c PARAMETERS_AS_JSON] [--binding-name BINDING_NAME] [flags]
Description
Binding a service injects information about the service into the App via the VCAP_SERVICES environment variable.
Examples
kf bind-service myapp mydb -c '{"permissions":"read-only"}'
Flags
--async
Do not wait for the action to complete on the server before returning.
-b, --binding-name=string
Name of the binding injected into the app, defaults to the service instance name.
-h, --help
help for bind-service
-c, --parameters=string
JSON object or path to a JSON file containing configuration parameters. (default "{}")
--timeout=duration
Amount of time to wait for the operation to complete. Valid units are "s", "m", "h". (default 30m0s)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
6 - kf bindings
Name
kf bindings
- List bindings in the targeted Space.
Synopsis
kf bindings [flags]
Examples
kf bindings
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for bindings
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
7 - kf build
Name
kf build
- Print information about the given Build.
Synopsis
kf build NAME [flags]
Examples
kf build my-build
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for build
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
8 - kf build-logs
Name
kf build-logs
- Get the logs of the given Build.
Synopsis
kf build-logs BUILD_NAME [flags]
Examples
kf build-logs build-12345
Flags
-h, --help
help for build-logs
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
9 - kf buildpacks
Name
kf buildpacks
- List buildpacks in the targeted Space.
Synopsis
kf buildpacks [flags]
Description
List the buildpacks available in the Space to Apps being built with buildpacks.
The buildpacks available to an App depend on the Stack it uses. To ensure reproducibility in Builds, Apps should explicitly declare the Stack they use.
Examples
kf buildpacks
Flags
-h, --help
help for buildpacks
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
10 - kf builds
Name
kf builds
- List Builds in the targeted Space.
Synopsis
kf builds [flags]
Examples
kf builds
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
--app=string
Sets a filter for the "app.kubernetes.io/name" label.
-h, --help
help for builds
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
11 - kf configure-cluster
Name
kf configure-cluster
- Set configuration for a cluster.
Synopsis
kf configure-cluster [subcommand] [flags]
Description
The configure-cluster sub-command allows operators to configure individual fields on a cluster.
Flags
-h, --help
help for configure-cluster
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
12 - kf configure-cluster get-feature-flags
Name
kf configure-cluster get-feature-flags
- Get the values for feature flags set on the cluster.
Synopsis
kf configure-cluster get-feature-flags [flags]
Examples
# Configure the cluster. kf configure-cluster get-feature-flags
Flags
-h, --help
help for get-feature-flags
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
13 - kf configure-cluster set-feature-flag
Name
kf configure-cluster set-feature-flag
- Set a feature flag on the cluster.
Synopsis
kf configure-cluster set-feature-flag FEATURE-FLAG-NAME BOOL [flags]
Examples
# Configure the cluster. kf configure-cluster set-feature-flag enable_route_services true
Flags
-h, --help
help for set-feature-flag
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
14 - kf configure-cluster unset-feature-flag
Name
kf configure-cluster unset-feature-flag
- Unset a feature flag on the cluster. Resets feature flag value to default.
Synopsis
kf configure-cluster unset-feature-flag FEATURE-FLAG-NAME [flags]
Examples
# Configure the cluster. kf configure-cluster unset-feature-flag enable_route_service
Flags
-h, --help
help for unset-feature-flag
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
15 - kf configure-space
Name
kf configure-space
- Set configuration for a Space.
Synopsis
kf configure-space [subcommand] [flags]
Description
The configure-space sub-command allows operators to configure individual fields on a Space.
In Kf, most configuration can be overridden at the Space level.
NOTE: The Space is reconciled every time changes are made using this command. If you want to configure Spaces in automation it’s better to use kubectl.
Flags
-h, --help
help for configure-space
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
16 - kf configure-space append-domain
Name
kf configure-space append-domain
- Append a domain for a Space.
Synopsis
kf configure-space append-domain [SPACE_NAME] DOMAIN [flags]
Examples
# Configure the Space "my-space" kf configure-space append-domain my-space myspace.mycompany.com # Configure the targeted Space kf configure-space append-domain myspace.mycompany.com
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for append-domain
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
17 - kf configure-space get-build-service-account
Name
kf configure-space get-build-service-account
- Get the service account that is used when building containers in the Space.
Synopsis
kf configure-space get-build-service-account [SPACE_NAME] [flags]
Examples
# Configure the Space "my-space" kf configure-space get-build-service-account my-space # Configure the targeted Space kf configure-space get-build-service-account
Flags
-h, --help
help for get-build-service-account
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
18 - kf configure-space get-buildpack-env
Name
kf configure-space get-buildpack-env
- Get the environment variables for Builds in a Space.
Synopsis
kf configure-space get-buildpack-env [SPACE_NAME] [flags]
Examples
# Configure the Space "my-space" kf configure-space get-buildpack-env my-space # Configure the targeted Space kf configure-space get-buildpack-env
Flags
-h, --help
help for get-buildpack-env
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
19 - kf configure-space get-container-registry
Name
kf configure-space get-container-registry
- Get the container registry used for Builds.
Synopsis
kf configure-space get-container-registry [SPACE_NAME] [flags]
Examples
# Configure the Space "my-space" kf configure-space get-container-registry my-space # Configure the targeted Space kf configure-space get-container-registry
Flags
-h, --help
help for get-container-registry
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
20 - kf configure-space get-domains
Name
kf configure-space get-domains
- Get domains associated with the Space.
Synopsis
kf configure-space get-domains [SPACE_NAME] [flags]
Examples
# Configure the Space "my-space" kf configure-space get-domains my-space # Configure the targeted Space kf configure-space get-domains
Flags
-h, --help
help for get-domains
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
21 - kf configure-space get-execution-env
Name
kf configure-space get-execution-env
- Get the Space wide App environment variables.
Synopsis
kf configure-space get-execution-env [SPACE_NAME] [flags]
Examples
# Configure the Space "my-space" kf configure-space get-execution-env my-space # Configure the targeted Space kf configure-space get-execution-env
Flags
-h, --help
help for get-execution-env
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
22 - kf configure-space get-nodeselector
Name
kf configure-space get-nodeselector
- Get the node selector associated with the Space.
Synopsis
kf configure-space get-nodeselector [SPACE_NAME] [flags]
Examples
# Configure the Space "my-space" kf configure-space get-nodeselector my-space # Configure the targeted Space kf configure-space get-nodeselector
Flags
-h, --help
help for get-nodeselector
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
23 - kf configure-space remove-domain
Name
kf configure-space remove-domain
- Remove a domain from a Space.
Synopsis
kf configure-space remove-domain [SPACE_NAME] DOMAIN [flags]
Examples
# Configure the Space "my-space" kf configure-space remove-domain my-space myspace.mycompany.com # Configure the targeted Space kf configure-space remove-domain myspace.mycompany.com
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for remove-domain
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
24 - kf configure-space set-app-egress-policy
Name
kf configure-space set-app-egress-policy
- Set the egress policy for Apps in the Space.
Synopsis
kf configure-space set-app-egress-policy [SPACE_NAME] POLICY [flags]
Examples
# Configure the Space "my-space" kf configure-space set-app-egress-policy my-space DenyAll # Configure the targeted Space kf configure-space set-app-egress-policy DenyAll
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for set-app-egress-policy
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
25 - kf configure-space set-app-ingress-policy
Name
kf configure-space set-app-ingress-policy
- Set the ingress policy for Apps in the Space.
Synopsis
kf configure-space set-app-ingress-policy [SPACE_NAME] POLICY [flags]
Examples
# Configure the Space "my-space" kf configure-space set-app-ingress-policy my-space DenyAll # Configure the targeted Space kf configure-space set-app-ingress-policy DenyAll
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for set-app-ingress-policy
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
26 - kf configure-space set-build-egress-policy
Name
kf configure-space set-build-egress-policy
- Set the egress policy for Builds in the Space.
Synopsis
kf configure-space set-build-egress-policy [SPACE_NAME] POLICY [flags]
Examples
# Configure the Space "my-space" kf configure-space set-build-egress-policy my-space DenyAll # Configure the targeted Space kf configure-space set-build-egress-policy DenyAll
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for set-build-egress-policy
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
27 - kf configure-space set-build-ingress-policy
Name
kf configure-space set-build-ingress-policy
- Set the ingress policy for Builds in the Space.
Synopsis
kf configure-space set-build-ingress-policy [SPACE_NAME] POLICY [flags]
Examples
# Configure the Space "my-space" kf configure-space set-build-ingress-policy my-space DenyAll # Configure the targeted Space kf configure-space set-build-ingress-policy DenyAll
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for set-build-ingress-policy
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
28 - kf configure-space set-build-service-account
Name
kf configure-space set-build-service-account
- Set the service account to use when building containers.
Synopsis
kf configure-space set-build-service-account [SPACE_NAME] SERVICE_ACCOUNT [flags]
Examples
# Configure the Space "my-space" kf configure-space set-build-service-account my-space myserviceaccount # Configure the targeted Space kf configure-space set-build-service-account myserviceaccount
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for set-build-service-account
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
29 - kf configure-space set-buildpack-env
Name
kf configure-space set-buildpack-env
- Set an environment variable for Builds in a Space.
Synopsis
kf configure-space set-buildpack-env [SPACE_NAME] ENV_VAR_NAME ENV_VAR_VALUE [flags]
Examples
# Configure the Space "my-space" kf configure-space set-buildpack-env my-space JDK_VERSION 11 # Configure the targeted Space kf configure-space set-buildpack-env JDK_VERSION 11
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for set-buildpack-env
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
30 - kf configure-space set-container-registry
Name
kf configure-space set-container-registry
- Set the container registry used for Builds.
Synopsis
kf configure-space set-container-registry [SPACE_NAME] REGISTRY [flags]
Examples
# Configure the Space "my-space" kf configure-space set-container-registry my-space gcr.io/my-project # Configure the targeted Space kf configure-space set-container-registry gcr.io/my-project
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for set-container-registry
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
31 - kf configure-space set-default-domain
Name
kf configure-space set-default-domain
- Set or create a default domain for a Space.
Synopsis
kf configure-space set-default-domain [SPACE_NAME] DOMAIN [flags]
Examples
# Configure the Space "my-space" kf configure-space set-default-domain my-space myspace.mycompany.com # Configure the targeted Space kf configure-space set-default-domain myspace.mycompany.com
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for set-default-domain
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
32 - kf configure-space set-env
Name
kf configure-space set-env
- Set a Space wide environment variable for all Apps.
Synopsis
kf configure-space set-env [SPACE_NAME] ENV_VAR_NAME ENV_VAR_VALUE [flags]
Examples
# Configure the Space "my-space" kf configure-space set-env my-space ENVIRONMENT production # Configure the targeted Space kf configure-space set-env ENVIRONMENT production
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for set-env
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
33 - kf configure-space set-nodeselector
Name
kf configure-space set-nodeselector
- Set a Space wide node selector for all Apps.
Synopsis
kf configure-space set-nodeselector [SPACE_NAME] NS_VAR_NAME NS_VAR_VALUE [flags]
Examples
# Configure the Space "my-space" kf configure-space set-nodeselector my-space DiskType ssd # Configure the targeted Space kf configure-space set-nodeselector DiskType ssd
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for set-nodeselector
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
34 - kf configure-space unset-buildpack-env
Name
kf configure-space unset-buildpack-env
- Unset an environment variable for Builds in a Space.
Synopsis
kf configure-space unset-buildpack-env [SPACE_NAME] ENV_VAR_NAME [flags]
Examples
# Configure the Space "my-space" kf configure-space unset-buildpack-env my-space JDK_VERSION # Configure the targeted Space kf configure-space unset-buildpack-env JDK_VERSION
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for unset-buildpack-env
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
35 - kf configure-space unset-env
Name
kf configure-space unset-env
- Unset a Space wide environment variable for all Apps.
Synopsis
kf configure-space unset-env [SPACE_NAME] ENV_VAR_NAME [flags]
Examples
# Configure the Space "my-space" kf configure-space unset-env my-space ENVIRONMENT # Configure the targeted Space kf configure-space unset-env ENVIRONMENT
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for unset-env
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
36 - kf configure-space unset-nodeselector
Name
kf configure-space unset-nodeselector
- Unset a Space wide node selector for all Apps.
Synopsis
kf configure-space unset-nodeselector [SPACE_NAME] NS_VAR_NAME [flags]
Examples
# Configure the Space "my-space" kf configure-space unset-nodeselector my-space DiskType # Configure the targeted Space kf configure-space unset-nodeselector DiskType
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for unset-nodeselector
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
37 - kf create-autoscaling-rule
Name
kf create-autoscaling-rule
- Create autoscaling rule for App.
Synopsis
kf create-autoscaling-rule APP RULE_TYPE MIN_THRESHOLD MAX_THRESHOLD [flags]
Description
Create an autoscaling rule for App.
The only supported rule type is CPU. It is the target percentage. It is calculated by taking the average of MIN_THRESHOLD and MAX_THRESHOLD.
The range of MIN_THRESHOLD and MAX_THRESHOLD is 1 to 100 (percent).
Examples
# Scale myapp based on CPU load targeting 50% utilization (halfway between 20 and 80) kf create-autoscaling-rule myapp CPU 20 80
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for create-autoscaling-rule
--no-short-circuit-wait
Allow the CLI to skip waiting if the mutation does not impact a running resource.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
38 - kf create-job
Name
kf create-job
- Create a Job on the App.
Synopsis
kf create-job APP_NAME JOB_NAME COMMAND [flags]
Description
The create-job sub-command lets operators create a Job that can be run on a schedule or ad hoc.
Examples
kf create-job my-app my-job "sleep 100"
Flags
--async
Do not wait for the action to complete on the server before returning.
-c, --concurrency-policy=string
Specifies how to treat concurrent executions of a Job: Always (default), Replace, or Forbid. (default "Always")
--cpu-cores=string
Amount of dedicated CPU cores to give the Task (for example 256M, 1024M, 1G).
-k, --disk-quota=string
Amount of dedicated disk space to give the Task (for example 256M, 1024M, 1G).
-h, --help
help for create-job
-m, --memory-limit=string
Amount of dedicated memory to give the Task (for example 256M, 1024M, 1G).
-s, --schedule=string
Cron schedule on which to execute the Job.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
39 - kf create-route
Name
kf create-route
- Create a traffic routing rule for a host+path pair.
Synopsis
kf create-route DOMAIN [--hostname HOSTNAME] [--path PATH] [flags]
Description
Creating a Route allows Apps to declare they want to receive traffic on the same host/domain/path combination.
Routes without any bound Apps (or with only stopped Apps) will return a 404 HTTP status code.
Kf doesn’t enforce Route uniqueness between Spaces. It’s recommended to provide each Space with its own subdomain instead.
Examples
kf create-route example.com --hostname myapp # myapp.example.com kf create-route --space myspace example.com --hostname myapp # myapp.example.com kf create-route example.com --hostname myapp --path /mypath # myapp.example.com/mypath kf create-route --space myspace myapp.example.com # myapp.example.com # Using SPACE to match 'cf' kf create-route myspace example.com --hostname myapp # myapp.example.com kf create-route myspace example.com --hostname myapp --path /mypath # myapp.example.com/mypath
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for create-route
--hostname=string
Hostname for the Route.
--path=string
URL path for the Route.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
40 - kf create-service
Name
kf create-service
- Create a service instance from a marketplace template.
Synopsis
kf create-service SERVICE PLAN SERVICE_INSTANCE [-c PARAMETERS_AS_JSON] [-b service-broker] [-t TAGS] [flags]
Description
Create service creates a new ServiceInstance using a template from the marketplace.
Examples
# Creates a new instance of a db-service with the name mydb, plan silver, and provisioning configuration kf create-service db-service silver mydb -c '{"ram_gb":4}' # Creates a new instance of a db-service from the broker named local-broker kf create-service db-service silver mydb -c ~/workspace/tmp/instance_config.json -b local-broker # Creates a new instance of a db-service with the name mydb and override tags kf create-service db-service silver mydb -t "list, of, tags"
Flags
--async
Do not wait for the action to complete on the server before returning.
-b, --broker=string
Name of the service broker that will create the instance.
-h, --help
help for create-service
-c, --parameters=string
JSON object or path to a JSON file containing configuration parameters. (default "{}")
-t, --tags=string
User-defined tags to differentiate services during injection.
--timeout=duration
Amount of time to wait for the operation to complete. Valid units are "s", "m", "h". (default 30m0s)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
41 - kf create-service-broker
Name
kf create-service-broker
- Add a service broker to the marketplace.
Synopsis
kf create-service-broker NAME USERNAME PASSWORD URL [flags]
Examples
kf create-service-broker mybroker user pass http://mybroker.broker.svc.cluster.local
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for create-service-broker
--space-scoped
Only create the broker in the targeted space.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
42 - kf create-space
Name
kf create-space
- Create a Space with the given name.
Synopsis
kf create-space NAME [flags]
Examples
# Create a Space with custom domains. kf create-space my-space --domain my-space.my-company.com # Create a Space that uses unique storage and service accounts. kf create-space my-space --container-registry gcr.io/my-project --build-service-account myserviceaccount # Set running and staging environment variables for Apps and Builds. kf create-space my-space --run-env=ENVIRONMENT=nonprod --stage-env=ENVIRONMENT=nonprod,JDK_VERSION=8
Flags
--build-service-account=string
Service account that Builds will use.
--container-registry=string
Container registry built Apps and source code will be stored in.
--domain=stringArray
Sets the valid domains for the Space. The first provided domain is the default.
-h, --help
help for create-space
--run-env=stringToString
Sets the running environment variables for all Apps in the Space.
--stage-env=stringToString
Sets the staging environment variables for all Builds in the Space.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
43 - kf create-user-provided-service
Name
kf create-user-provided-service
- Create a standalone service instance from existing credentials.
Synopsis
kf create-user-provided-service SERVICE_INSTANCE [-p CREDENTIALS] [-t TAGS] [flags]
Description
Creates a standalone service instance from existing credentials. User-provided services can be used to inject credentials for services managed outside of Kf into Apps.
Credentials are stored in a Kubernetes Secret in the Space the service is created in. On GKE these Secrets are encrypted at rest and can optionally be encrypted using KMS.
Examples
# Bring an existing database service kf create-user-provided-service db-service -p '{"url":"mysql://..."}' # Create a service with tags for autowiring kf create-user-provided-service db-service -t "mysql,database,sql"
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for create-user-provided-service
--mock-class=string
Mock class name to use in VCAP_SERVICES rather than 'user-provided'.
--mock-plan=string
Mock plan name to use in VCAP_SERVICES rather than blank.
-p, --parameters=string
JSON object or path to a JSON file containing configuration parameters. (default "{}")
--params=string
JSON object or path to a JSON file containing configuration parameters. DEPRECATED: use --parameters instead. (default "{}")
-r, --route=string
URL to which requests for bound routes will be forwarded. Scheme must be https. NOTE: This is a preivew feature.
-t, --tags=string
User-defined tags to differentiate services during injection.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
44 - kf debug
Name
kf debug
- Print debugging information useful for filing a bug report.
Synopsis
kf debug [flags]
Examples
kf debug
Flags
-h, --help
help for debug
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
45 - kf delete
Name
kf delete
- Delete the App with the given name in the targeted Space.
Synopsis
kf delete NAME [flags]
Description
Deletes the App with the given name and wait for it to be deleted.
Kubernetes will delete the App once all child resources it owns have been deleted. Deletion may take a long time if any of the following conditions are true:
- There are many child objects.
- There are finalizers on the object preventing deletion.
- The cluster is in an unhealthy state.
Deleting an App will remove associated deployment history, cluster logs, and Builds.
Things that won’t be deleted:
- source code
- container images
- Routes
- ServiceInstances
Examples
kf delete my-app
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for delete
--retries=int
Number of times to retry execution if the command isn't successful. (default 5)
--retry-delay=duration
Set the delay between retries. (default 1s)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
46 - kf delete-autoscaling-rules
Name
kf delete-autoscaling-rules
- Delete all autoscaling rules for App and disable autoscaling.
Synopsis
kf delete-autoscaling-rules APP_NAME [flags]
Examples
kf delete-autoscaling-rules myapp
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for delete-autoscaling-rules
--no-short-circuit-wait
Allow the CLI to skip waiting if the mutation does not impact a running resource.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
47 - kf delete-job
Name
kf delete-job
- Delete the Job with the given name in the targeted Space.
Synopsis
kf delete-job NAME [flags]
Description
Deletes the Job with the given name and wait for it to be deleted.
Kubernetes will delete the Job once all child resources it owns have been deleted. Deletion may take a long time if any of the following conditions are true:
- There are many child objects.
- There are finalizers on the object preventing deletion.
- The cluster is in an unhealthy state.
Note: Deleting the Job will delete all associated executions, even executions which are still running.
Examples
kf delete-job my-job
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for delete-job
--retries=int
Number of times to retry execution if the command isn't successful. (default 5)
--retry-delay=duration
Set the delay between retries. (default 1s)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
48 - kf delete-job-schedule
Name
kf delete-job-schedule
- Delete the schedule for a Job.
Synopsis
kf delete-job-schedule JOB_NAME [flags]
Description
The delete-job-schedule sub-command lets operators suspend the Job by deleting the schedule.
Examples
kf delete-job-schedule my-job
Flags
-h, --help
help for delete-job-schedule
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
49 - kf delete-network-policy
Name
kf delete-network-policy
- Delete the NetworkPolicy with the given name in the targeted Space.
Synopsis
kf delete-network-policy NAME [flags]
Description
Deletes the NetworkPolicy with the given name and wait for it to be deleted.
Kubernetes will delete the NetworkPolicy once all child resources it owns have been deleted. Deletion may take a long time if any of the following conditions are true:
- There are many child objects.
- There are finalizers on the object preventing deletion.
- The cluster is in an unhealthy state.
Note: Deleting the last network policy targeting a Service will cause it to default to whatever policy is set for the cluster.
Examples
kf delete-network-policy my-networkpolicy
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for delete-network-policy
--retries=int
Number of times to retry execution if the command isn't successful. (default 5)
--retry-delay=duration
Set the delay between retries. (default 1s)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
50 - kf delete-orphaned-routes
Name
kf delete-orphaned-routes
- Delete Routes with no App bindings.
Synopsis
kf delete-orphaned-routes [flags]
Description
Deletes Routes in the targeted Space that are fully reconciled and don’t have any bindings to Apps.
Examples
kf delete-orphaned-routes
Flags
-h, --help
help for delete-orphaned-routes
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
51 - kf delete-route
Name
kf delete-route
- Delete a Route in the targeted Space.
Synopsis
kf delete-route DOMAIN [--hostname HOSTNAME] [--path PATH] [flags]
Examples
# Delete the Route myapp.example.com kf delete-route example.com --hostname myapp # Delete a Route on a path myapp.example.com/mypath kf delete-route example.com --hostname myapp --path /mypath
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for delete-route
--hostname=string
Hostname for the Route.
--path=string
URL path for the Route.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
52 - kf delete-service
Name
kf delete-service
- Delete the ServiceInstance with the given name in the targeted Space.
Synopsis
kf delete-service NAME [flags]
Description
Deletes the ServiceInstance with the given name and wait for it to be deleted.
Kubernetes will delete the ServiceInstance once all child resources it owns have been deleted. Deletion may take a long time if any of the following conditions are true:
- There are many child objects.
- There are finalizers on the object preventing deletion.
- The cluster is in an unhealthy state.
You should delete all bindings before deleting a service. If you don’t, the service will wait for that to occur before deleting.
Examples
kf delete-service my-serviceinstance
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for delete-service
--retries=int
Number of times to retry execution if the command isn't successful. (default 5)
--retry-delay=duration
Set the delay between retries. (default 1s)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
53 - kf delete-service-broker
Name
kf delete-service-broker
- Remove a service broker from the marketplace.
Synopsis
kf delete-service-broker NAME [flags]
Examples
kf delete-service-broker mybroker
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for delete-service-broker
--space-scoped
Set to delete a space scoped service broker.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
54 - kf delete-space
Name
kf delete-space
- Delete the Space with the given name.
Synopsis
kf delete-space NAME [flags]
Description
Deletes the Space with the given name and wait for it to be deleted.
Kubernetes will delete the Space once all child resources it owns have been deleted. Deletion may take a long time if any of the following conditions are true:
- There are many child objects.
- There are finalizers on the object preventing deletion.
- The cluster is in an unhealthy state.
Deleting a Space will also delete its:
- Apps
- Build history
- Service bindings
- Service instances
- Routes
- The backing Kubernetes Namespace
- Kubernetes resources in the Namespace
You will be unable to make changes to resources in the Space once deletion has begun.
Examples
kf delete-space my-space
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for delete-space
--retries=int
Number of times to retry execution if the command isn't successful. (default 5)
--retry-delay=duration
Set the delay between retries. (default 1s)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
55 - kf disable-autoscaling
Name
kf disable-autoscaling
- Disable autoscaling for App.
Synopsis
kf disable-autoscaling APP_NAME [flags]
Examples
kf disable-autoscaling APP_NAME
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for disable-autoscaling
--no-short-circuit-wait
Allow the CLI to skip waiting if the mutation does not impact a running resource.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
56 - kf doctor
Name
kf doctor
- Run validation tests against one or more components.
Synopsis
kf doctor [(COMPONENT|TYPE/NAME)...] [flags]
Description
Doctor runs tests on one or more components or objects to validate their desired status.
If no arguments are supplied, then all component tests are ran. If one or more arguments are suplied then only the test for those components or objects are ran.
Possible components are:
- cluster
- istio
Possible object types are:
- app
- build
- clusterservicebroker
- route
- servicebroker
- serviceinstance
- serviceinstancebinding
- sourcepackage
- space
- task
Examples
# Run doctor against all components. kf doctor # Run doctor against server-side components. kf doctor cluster # Run doctor for a Kf App named my-app. kf doctor app/my-app # Run doctor for a Kf Service named my-service. kf doctor serviceinstance/my-service # Run doctor for a Kf Binding named my-binding. kf doctor serviceinstancebinding/my-binding # Run doctor for the Kf Operator. kf doctor operator
Flags
--delay=duration
Set the delay between executions. (default 5s)
-h, --help
help for doctor
--retries=int
Number of times to retry doctor if it isn't successful. (default 1)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
57 - kf domains
Name
kf domains
- List domains that can be used in the targeted Space.
Synopsis
kf domains [flags]
Examples
kf domains
Flags
-h, --help
help for domains
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
58 - kf enable-autoscaling
Name
kf enable-autoscaling
- Enable autoscaling for App.
Synopsis
kf enable-autoscaling APP_NAME [flags]
Description
Enabling autoscaling creates a HorizontalPodAutoscaler (HPA) for an App. HPA controls the number of replicas the App should have based on CPU utilization.
Autoscaler will only take effect after autoscaling limits are set and autoscaling rules are added.
Set autoscaling limits by running: kf update-autoscaling-limits APP_NAME MIN_INSTANCES MAX_INSTANCES
Add rules by running: kf create-autoscaling-rule APP_NAME RULE_TYPE MIN_THRESHOLD MAX_THRESHOLD
Examples
kf enable-autoscaling myapp
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for enable-autoscaling
--no-short-circuit-wait
Allow the CLI to skip waiting if the mutation does not impact a running resource.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
59 - 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:
- Space (set by administrators)
- App (set by developers)
- 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 the App can consume.
- MEMORY_LIMIT_IN_MB: 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.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
60 - kf fix-orphaned-bindings
Name
kf fix-orphaned-bindings
- Fix bindings without an app owner in a space.
Synopsis
kf fix-orphaned-bindings [flags]
Description
Fix bindings with a missing owner reference to an App.
Examples
# Identify broken bindings in the targeted space. kf fix-orphaned-bindings # Fix bindings in the targeted space. kf fix-orphaned-bindings --dry-run=false
Flags
--dry-run
Run the command without applying changes. (default true)
-h, --help
help for fix-orphaned-bindings
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
61 - kf job-history
Name
kf job-history
- List the execution history of a Job.
Synopsis
kf job-history JOB_NAME [flags]
Description
The job-history sub-command lets operators view the execution history of a Job.
Examples
kf job-history my-job
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for job-history
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
62 - kf job-schedules
Name
kf job-schedules
- List job schedules in the targeted Space.
Synopsis
kf job-schedules [flags]
Examples
kf job-schedules
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for job-schedules
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
63 - kf jobs
Name
kf jobs
- List Jobs in the targeted Space.
Synopsis
kf jobs [flags]
Examples
kf jobs
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for jobs
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
64 - kf logs
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 # Get the logs of Tasks running from the App kf logs myapp --task
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.
--task
Tail Task logs instead of App.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
65 - kf map-route
Name
kf map-route
- Grant an App access to receive traffic from the Route.
Synopsis
kf map-route APP_NAME DOMAIN [--hostname HOSTNAME] [--path PATH] [--weight WEIGHT] [flags]
Description
Mapping an App to a Route will cause traffic to be forwarded to the App if the App has instances that are running and healthy.
If multiple Apps are mapped to the same Route they will split traffic between them roughly evenly. Incoming network traffic is handled by multiple gateways which update their routing tables with slight delays and route independently. Because of this, traffic routing may not appear even but it will converge over time.
Examples
kf map-route myapp example.com --hostname myapp # myapp.example.com kf map-route myapp myapp.example.com # myapp.example.com kf map-route myapp example.com --hostname myapp --weight 2 # myapp.example.com, myapp receives 2x traffic kf map-route --space myspace myapp example.com --hostname myapp # myapp.example.com kf map-route myapp example.com --hostname myapp --path /mypath # myapp.example.com/mypath
Flags
--async
Do not wait for the action to complete on the server before returning.
--destination-port=int32
Port on the App the Route will connect to.
-h, --help
help for map-route
--hostname=string
Hostname for the Route.
--no-short-circuit-wait
Allow the CLI to skip waiting if the mutation does not impact a running resource.
--path=string
URL path for the Route.
--weight=int32
Weight for the Route. (default 1)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
66 - kf marketplace
Name
kf marketplace
- List service classes available in the cluster.
Synopsis
kf marketplace [-s SERVICE] [flags]
Examples
# Show service classes available in the cluster kf marketplace # Show the plans available to a particular service class kf marketplace -s google-storage
Flags
-h, --help
help for marketplace
-s, --service=string
List plans for the service class.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
67 - kf network-policies
Name
kf network-policies
- List network policies in the targeted Space.
Synopsis
kf network-policies [flags]
Examples
kf network-policies
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for network-policies
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
68 - kf network-policy
Name
kf network-policy
- Print information about the given NetworkPolicy.
Synopsis
kf network-policy NAME [flags]
Examples
kf network-policy my-network-policy
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for network-policy
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
69 - kf proxy
Name
kf proxy
- Start a local reverse proxy to an App.
Synopsis
kf proxy APP_NAME [flags]
Description
Proxy creates a reverse HTTP proxy to the cluster’s gateway on a local port opened on the operating system’s loopback device.
The proxy rewrites all HTTP requests, changing the HTTP Host header and adding an additional header X-Kf-App to ensure traffic reaches the specified App even if multiple are attached to the same route.
Proxy does not establish a direct connection to the App.
For proxy to work:
- The cluster’s gateway must be accessible from your local machine.
- The App must have a public URL
If you need to establish a direct connection to an App, use the port-forward command in kubectl. It establishes a proxied connection directly to a port on a pod via the Kubernetes cluster. port-forward bypasses all routing.
Examples
kf proxy myapp
Flags
--gateway=string
IP address of the HTTP gateway to route requests to.
-h, --help
help for proxy
--port=int
Local port to listen on. (default 8080)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
70 - kf proxy-route
Name
kf proxy-route
- Start a local reverse proxy to a Route.
Synopsis
kf proxy-route ROUTE [flags]
Description
Proxy route creates a reverse HTTP proxy to the cluster’s gateway on a local port opened on the operating system’s loopback device.
The proxy rewrites all HTTP requests, changing the HTTP Host header to match the Route. If multiple Apps are mapped to the same route, the traffic sent over the proxy will follow their routing rules with regards to weight. If no Apps are mapped to the route, traffic sent through the proxy will return a HTTP 404 status code.
Proxy route DOES NOT establish a direct connection to any Kubernetes resource.
For proxy to work:
- The cluster’s gateway MUST be accessible from your local machine.
- The Route MUST have a public URL
Examples
kf proxy-route myhost.example.com
Flags
--gateway=string
IP address of the HTTP gateway to route requests to.
-h, --help
help for proxy-route
--port=int
Local port to listen on. (default 8080)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
71 - kf push
Name
kf push
- Create a new App or apply updates to an existing one.
Synopsis
kf push APP_NAME [flags]
Examples
kf push myapp kf push myapp --buildpack my.special.buildpack # Discover via kf buildpacks kf push myapp --env FOO=bar --env BAZ=foo kf push myapp --stack cloudfoundry/cflinuxfs3 # Use a cflinuxfs3 runtime kf push myapp --health-check-http-endpoint /myhealthcheck # Specify a healthCheck for the app
Flags
--app-suffix=string
Suffix to append to the end of every pushed App.
--args=stringArray
Override the args for the image. Can't be used with the command flag.
-b, --buildpack=string
Use the specified buildpack rather than the built-in.
-c, --command=string
Startup command for the App, this overrides the default command specified by the web process.
--container-registry=string
Container registry to push images to.
--cpu-cores=string
Number of dedicated CPU cores to give each App instance (for example 100m, 0.5, 1, 2). For more information see https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/.
-k, --disk-quota=string
Size of dedicated ephemeral disk attached to each App instance (for example 512M, 2G, 1T).
--docker-image=string
Docker image to deploy rather than building from source.
--dockerfile=string
Path to the Dockerfile to build. Relative to the source root.
--entrypoint=string
Overwrite the default entrypoint of the image. Can't be used with the command flag.
-e, --env=stringArray
Set environment variables. Multiple can be set by using the flag multiple times (for example, NAME=VALUE).
--health-check-http-endpoint=string
HTTP endpoint to target as part of the health-check. Only valid if health-check-type is http.
-u, --health-check-type=string
App health check type: http, port (default) or process.
-h, --help
help for push
-i, --instances=int32
If set, overrides the number of instances of the App to run, -1 represents non-user input. (default -1)
-f, --manifest=string
Path to the application manifest.
-m, --memory-limit=string
Amount of dedicated RAM to give each App instance (for example 512M, 6G, 1T).
--no-manifest
Do not read the manifest file even if one exists.
--no-route
Prevents the App from being reachable once deployed.
--no-start
Build but do not run the App.
-p, --path=string
If specified, overrides the path to the source code.
--random-route
Create a random Route for this App if it doesn't have one.
--route=stringArray
Use the routes flag to provide multiple HTTP and TCP routes. Each Route for this App is created if it does not already exist.
-s, --stack=string
Base image to use for to use for Apps created with a buildpack.
--task
Push an App to execute Tasks only. The App will be built, but not run. It will not have a route assigned.
-t, --timeout=int
Amount of time the App can be unhealthy before declaring it as unhealthy.
--var=stringToString
Manifest variable substitution. Multiple can be set by using the flag multiple times (for example NAME=VALUE).
--vars-file=stringArray
JSON or YAML file to read variable substitutions from. Can be supplied multiple times.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
72 - kf restage
Name
kf restage
- Rebuild and redeploy an App without downtime.
Synopsis
kf restage APP_NAME [flags]
Description
Restaging an App will re-run the latest Build to produce a new container image, and if successful will replace each running instance with the new image.
Instances are replaced one at a time, always ensuring that the desired number of instances are healthy. This property is upheld by running one additional instance of the App and swapping it out for an old instance.
The operation completes once all instances have been replaced.
Examples
kf restage myapp
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for restage
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
73 - kf restart
Name
kf restart
- Restart each running instance of an App without downtime.
Synopsis
kf restart APP_NAME [flags]
Description
Restarting an App will replace each running instance of an App with a new one.
Instances are replaced one at a time, always ensuring that the desired number of instances are healthy. This property is upheld by running one additional instance of the App and swapping it out for an old instance.
The operation completes once all instances have been replaced.
Examples
kf restart myapp
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for restart
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
74 - kf routes
Name
kf routes
- List routes in the targeted Space.
Synopsis
kf routes [flags]
Examples
kf routes
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for routes
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
75 - kf run-job
Name
kf run-job
- Run the Job once.
Synopsis
kf run-job JOB_NAME [flags]
Description
The run-job sub-command lets operators run a Job once.
Examples
kf run-job my-job
Flags
--cpu-cores=string
Amount of dedicated CPU cores to give the Task (for example 256M, 1024M, 1G).
-k, --disk-quota=string
Amount of dedicated disk space to give the Task (for example 256M, 1024M, 1G).
-h, --help
help for run-job
-m, --memory-limit=string
Amount of dedicated memory to give the Task (for example 256M, 1024M, 1G).
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
76 - kf run-task
Name
kf run-task
- Run a short-lived Task on the App.
Synopsis
kf run-task APP_NAME [flags]
Description
The run-task sub-command lets operators run a short-lived Task on the App.
Examples
kf run-task my-app --command "sleep 100" --name my-task
Flags
-c, --command=string
Command to execute on the Task.
--cpu-cores=string
Amount of dedicated CPU cores to give the Task (for example 256M, 1024M, 1G).
-k, --disk-quota=string
Amount of dedicated disk space to give the Task (for example 256M, 1024M, 1G).
-h, --help
help for run-task
-m, --memory-limit=string
Amount of dedicated memory to give the Task (for example 256M, 1024M, 1G).
--name=string
Display name to give the Task (auto generated if omitted).
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
77 - kf scale
Name
kf scale
- Change the horizontal or vertical scale of an App without downtime.
Synopsis
kf scale APP_NAME [flags]
Description
Scaling an App will change the number of desired instances and/or the requested resources for each instance.
Instances are replaced one at a time, always ensuring that the desired number of instances are healthy. This property is upheld by running one additional instance of the App and swapping it out for an old instance.
The operation completes once all instances have been replaced.
Examples
# Display current scale settings kf scale myapp # Scale to exactly 3 instances kf scale myapp --instances 3
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for scale
-i, --instances=int32
Number of instances, must be >= 1. (default -1)
--no-short-circuit-wait
Allow the CLI to skip waiting if the mutation does not impact a running resource.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
78 - kf schedule-job
Name
kf schedule-job
- Schedule the Job for execution on a cron schedule.
Synopsis
kf schedule-job JOB_NAME SCHEDULE [flags]
Description
The schedule-job sub-command lets operators schedule a Job for execution on a cron schedule.
Examples
kf schedule-job my-job "* * * * *"
Flags
-h, --help
help for schedule-job
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
79 - kf service
Name
kf service
- Print information about the given ServiceInstance.
Synopsis
kf service NAME [flags]
Examples
kf service my-service
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for service
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
80 - kf services
Name
kf services
- List services in the targeted Space.
Synopsis
kf services [flags]
Examples
kf services
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for services
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
81 - kf set-env
Name
kf set-env
- Create or update an environment variable for an App.
Synopsis
kf set-env APP_NAME ENV_VAR_NAME ENV_VAR_VALUE [flags]
Description
Sets an environment variable for an App. Existing environment variable(s) on the App with the same name will be replaced.
Apps will be updated without downtime.
Examples
# Set an environment variable on an App. kf set-env myapp ENV production # Don't wait for the App to restart. kf set-env --async myapp ENV production # Set an environment variable that starts with a dash. kf set-env myapp -- JAVA_OPTS -Dtest=sometest
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for set-env
--no-short-circuit-wait
Allow the CLI to skip waiting if the mutation does not impact a running resource.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
82 - kf set-space-role
Name
kf set-space-role
- Assgin a Role to a Subject (User|Group|ServiceAccount).
Synopsis
kf set-space-role SUBJECT_NAME ROLE [flags]
Examples
# Assign a User to a Role kf set-space-role john@example.com SpaceDeveloper # Assign a Group to a Role kf set-space-role my-group SpaceAuditor -t Group # Assign a ServiceAccount to a Role kf set-space-role my-sa SpaceAuditor -t ServiceAccount
Flags
-h, --help
help for set-space-role
-t, --type=string
Type of subject, valid values are Group|ServiceAccount|User(default). (default "User")
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
83 - kf space
Name
kf space
- Print information about the given Space.
Synopsis
kf space NAME [flags]
Examples
kf space my-space
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for space
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
84 - kf space-users
Name
kf space-users
- List users and their roles in a Space.
Synopsis
kf space-users [flags]
Examples
kf space-users
Flags
-h, --help
help for space-users
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
85 - kf spaces
Name
kf spaces
- List Spaces in the cluster.
Synopsis
kf spaces [flags]
Examples
kf spaces
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for spaces
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
86 - kf ssh
Name
kf ssh
- Open a shell on an App instance.
Synopsis
kf ssh APP_NAME [flags]
Description
Opens a shell on an App instance using the Pod exec endpoint.
This command mimics CF’s SSH command by opening a connection to the Kubernetes control plane which spawns a process in a Pod.
The command connects to an arbitrary Pod that matches the App’s runtime
labels. If you want a specific Pod, use the pod/
NOTE: Traffic is encrypted between the CLI and the control plane, and between the control plane and Pod. A malicious Kubernetes control plane could observe the traffic.
Examples
# Open a shell to a specific App kf ssh myapp # Open a shell to a specific Pod kf ssh pod/myapp-revhex-podhex # Start a different command with args kf ssh myapp -c /my/command -c arg1 -c arg2
Flags
-c, --command=stringArray
Command to run for the shell. Subsequent definitions will be used as args. (default [/bin/bash])
--container=string
Container to start the command in. (default "user-container")
-T, --disable-pseudo-tty
Don't use a TTY when executing.
-h, --help
help for ssh
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
87 - kf stacks
Name
kf stacks
- List stacks in the targeted Space.
Synopsis
kf stacks [flags]
Description
Stacks contain information about how to build and run an App. Each stack contains:
- A unique name to identify it.
- A build image, the image used to build the App, this usually contains things like compilers, libraries, sources and build frameworks.
- A run image, the image App instances will run within. These images are usually lightweight and contain just enough to run an App.
- A list of applicable buildpacks available via the bulidpacks command.
Examples
kf stacks
Flags
-h, --help
help for stacks
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
88 - kf start
Name
kf start
- Deploy a stopped App and route traffic to it once healthy.
Synopsis
kf start APP_NAME [flags]
Description
Starting an App will create a Kubernetes Deployment and Service. The Deployment will use the supplied health checks to validate liveness. While the Deployment is sclaing up, Routes will be modified to send traffic to live instances of the App.
Examples
kf start myapp
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for start
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
89 - kf stop
Name
kf stop
- Remove instances of a running App and stop network traffic.
Synopsis
kf stop APP_NAME [flags]
Description
Stopping an App will remove the associated Kubernetes Deployment and Service. This will also delete any historical revisions associated with the App. HTTP traffic being routed to the App will instead be routed to other Apps bound to the Route or will error with an 404 status code if no other Apps are bound.
Examples
kf stop myapp
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for stop
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
90 - kf target
Name
kf target
- Set the default Space to run commands against.
Synopsis
kf target [flags]
Examples
# See the current Space kf target # Target a Space kf target -s my-space
Flags
-h, --help
help for target
-s, --target-space=string
Target the given space.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
91 - kf tasks
Name
kf tasks
- List Tasks in the targeted Space.
Synopsis
kf tasks [APP] [flags]
Examples
kf tasks
Flags
--allow-missing-template-keys
If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
-h, --help
help for tasks
-o, --output=string
Output format. One of: go-template|go-template-file|json|jsonpath|jsonpath-as-json|jsonpath-file|name|template|templatefile|yaml.
--show-managed-fields
If true, keep the managedFields when printing objects in JSON or YAML format.
--template=string
Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
92 - kf terminate-task
Name
kf terminate-task
- Terminate a running Task.
Synopsis
kf terminate-task {TASK_NAME | APP_NAME TASK_ID} [flags]
Description
Allows operators to terminate a running Task on an App.
Examples
# Terminate Task by Task name kf terminate-task my-task-name # Terminate Task by App name and Task ID kf terminate-task my-app 1
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for terminate-task
--retries=int
Number of times to retry execution if the command isn't successful. (default 5)
--retry-delay=duration
Set the delay between retries. (default 1s)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
93 - kf unbind-route-service
Name
kf unbind-route-service
- Unbind a route service instance from an HTTP route.
Synopsis
kf unbind-route-service DOMAIN [--hostname HOSTNAME] [--path PATH] SERVICE_INSTANCE [flags]
Description
PREVIEW: this feature is not ready for production use. Unbinding a route service from an HTTP route causes requests to go straight to the HTTP route, rather than being processed by the route service first.
Examples
kf unbind-route-service company.com --hostname myapp --path mypath myauthservice
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for unbind-route-service
--hostname=string
Hostname for the Route.
--path=string
URL path for the Route.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
94 - kf unbind-service
Name
kf unbind-service
- Revoke an App’s access to a service instance.
Synopsis
kf unbind-service APP_NAME SERVICE_INSTANCE [flags]
Description
Unbind removes an App’s access to a service instance.
This will delete the credential from the service broker that created the instance and update the VCAP_SERVICES environment variable for the App to remove the reference to the instance.
Examples
kf unbind-service myapp my-instance
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for unbind-service
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
95 - kf unmap-route
Name
kf unmap-route
- Revoke an App’s access to receive traffic from the Route.
Synopsis
kf unmap-route APP_NAME DOMAIN [--hostname HOSTNAME] [--path PATH] [flags]
Description
Unmapping an App from a Route will cause traffic matching the Route to no longer be forwarded to the App.
The App may still receive traffic from an unmapped Route for a small period of time while the traffic rules on the gateways are propagated.
The Route will re-balance its routing weights so other Apps mapped to it will receive the traffic. If no other Apps are bound the Route will return a 404 HTTP status code.
Examples
# Unmap myapp.example.com from myapp in the targeted Space kf unmap-route myapp example.com --hostname myapp # Unmap the Route in a specific Space kf unmap-route --space myspace myapp example.com --hostname myapp # Unmap a Route with a path kf unmap-route myapp example.com --hostname myapp --path /mypath
Flags
--async
Do not wait for the action to complete on the server before returning.
--destination-port=int32
Port on the App the Route will connect to.
-h, --help
help for unmap-route
--hostname=string
Hostname for the Route.
--no-short-circuit-wait
Allow the CLI to skip waiting if the mutation does not impact a running resource.
--path=string
URL path for the Route.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
96 - kf unset-env
Name
kf unset-env
- Delete an environment variable on an App.
Synopsis
kf unset-env APP_NAME ENV_VAR_NAME [flags]
Description
Removes an environment variable by name from an App. Any existing environment variable(s) on the App with the same name will be removed.
Environment variables that are set by Kf or on the Space will be unaffected.
Apps will be updated without downtime.
Examples
kf unset-env myapp FOO
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for unset-env
--no-short-circuit-wait
Allow the CLI to skip waiting if the mutation does not impact a running resource.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
97 - kf unset-space-role
Name
kf unset-space-role
- Unassign a Role to a Subject.
Synopsis
kf unset-space-role SUBJECT_NAME ROLE [flags]
Examples
# Unassign a User to a Role kf unset-space-role john@example.com SpaceDeveloper # Unassign a Group to a Role kf unset-space-role my-group SpaceAuditor -t Group # Unassign a ServiceAccount to a Role kf unset-space-role my-sa SpaceAuditor -t ServiceAccount
Flags
-h, --help
help for unset-space-role
-t, --type=string
Type of subject, valid values are Group|ServiceAccount|User(default). (default "User")
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
98 - kf update-autoscaling-limits
Name
kf update-autoscaling-limits
- Update autoscaling limits for App.
Synopsis
kf update-autoscaling-limits APP_NAME MIN_INSTANCE_LIMIT MAX_INSTANCE_LIMIT [flags]
Examples
# Set min instances to 1, max instances to 3 for myapp kf update-autoscaling-limits myapp 1 3
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for update-autoscaling-limits
--no-short-circuit-wait
Allow the CLI to skip waiting if the mutation does not impact a running resource.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
99 - kf update-user-provided-service
Name
kf update-user-provided-service
- Update a standalone service instance with new credentials.
Synopsis
kf update-user-provided-service SERVICE_INSTANCE [-p CREDENTIALS] [-t TAGS] [flags]
Description
Updates the credentials stored in the Kubernetes Secret for a user-provided service. These credentials will be propagated to Apps.
Apps may need to be restarted to receive the updated credentials.
Examples
# Update an existing database service kf update-user-provided-service db-service -p '{"url":"mysql://..."}' # Update a service with tags for autowiring kf update-user-provided-service db-service -t "mysql,database,sql"
Flags
--async
Do not wait for the action to complete on the server before returning.
-h, --help
help for update-user-provided-service
-p, --params=string
Valid JSON object containing service-specific configuration parameters, provided in-line or in a file. (default "{}")
-t, --tags=string
Comma-separated tags for the service instance.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
100 - kf vcap-services
Name
kf vcap-services
- Print the VCAP_SERVICES environment variable for an App.
Synopsis
kf vcap-services APP_NAME [flags]
Examples
kf vcap-services my-app
Flags
-h, --help
help for vcap-services
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
101 - kf version
Name
kf version
- Print the CLI version.
Synopsis
kf version [flags]
Examples
kf version
Flags
-h, --help
help for version
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
102 - kf wrap-v2-buildpack
Name
kf wrap-v2-buildpack
- Create a V3 buildpack that wraps a V2 buildpack.
Synopsis
kf wrap-v2-buildpack NAME V2_BUILDPACK_URL|PATH [flags]
Description
Creates a V3 buildpack that wraps a V2 buildpack.
The resulting buildpack can then be used with other V3 buildpacks by creating a builder. See https://buildpacks.io/docs/operator-guide/create-a-builder/ for more information.
A V3 buildpack is packaged as an OCI container. If the –publish flag is provided, then the container will be published to the corresponding container repository.
This command uses other CLIs under the hood. This means the following CLIs need to be available on the path:
- go
- git
- pack
- cp
- unzip
We recommend using Cloud Shell to ensure these CLIs are available and the correct version.
Examples
# Download buildpack from the given git URL. Uses the git CLI to # download the repository. kf wrap-v2-buildpack gcr.io/some-project/some-name https://github.com/some/buildpack # Creates the buildpack from the given path. kf wrap-v2-buildpack gcr.io/some-project/some-name path/to/buildpack # Creates the buildpack from the given archive file. kf wrap-v2-buildpack gcr.io/some-project/some-name path/to/buildpack.zip
Flags
--builder-repo=string
Builder repo to use. (default "github.com/poy/buildpackapplifecycle/builder")
--buildpack-stacks=stringArray
Stack(s) this buildpack will be compatible with. (default [google])
--buildpack-version=string
Version of the resulting buildpack. This will be used as the image tag. (default "0.0.1")
-h, --help
help for wrap-v2-buildpack
--launcher-repo=string
Launcher repo to use. (default "github.com/poy/buildpackapplifecycle/launcher")
--output-dir=string
Output directory for the buildpack data (before it's packed). If left empty, a temp dir will be used.
--publish
Publish the buildpack image.
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.
103 - kf xargs-apps
Name
kf xargs-apps
- Run a command for every App.
Synopsis
kf xargs-apps [flags]
Description
Run a command for every App in targeted spaces.
Examples
# Example: restart all apps in all spaces kf xargs-apps --all-namespaces -- kf restart {{.Name}} --space {{.Space}} # Example: restage all apps in all spaces kf xargs-apps --all-namespaces -- kf restage {{.Name}} --space {{.Space}} # Example: stop all apps in spaces 'space1' and 'space2' kf xargs-apps --space space1,space2 -- kf stop {{.Name}} --space {{.Space}} # Example: use kubectl to label all apps in the default space kf xargs-apps -- kubectl label apps -n {{.Space}} {{.Name}} environment=prod
Flags
--all-namespaces
Enables targeting all spaces in the cluster.
--dry-run
Enables dry-run mode, commands are printed but will not be executed. (default true)
-h, --help
help for xargs-apps
--resource-concurrency=int
Number of apps within a space that may be operated on in parallel. Total concurrency will be upto space-concurrency * app-concurrency. -1 for no limit. (default 1)
--space-concurrency=int
Number of spaces that may be operated on in parallel. -1 for no limit. (default -1)
Inherited flags
These flags are inherited from parent commands.
--as=string
Username to impersonate for the operation.
--as-group=strings
Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.
--config=string
Path to the Kf config file to use for CLI requests.
--kubeconfig=string
Path to the kubeconfig file to use for CLI requests.
--log-http
Log HTTP requests to standard error.
--space=string
Space to run the command against. This flag overrides the currently targeted Space.