Stay organized with collections
Save and categorize content based on your preferences.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# kf create-space\n\n### Name\n\n`kf create-space` - Create a Space with the given name.\n\n### Synopsis\n\n```\nkf create-space NAME [flags]\n```\n\n### Examples\n\n```\n# Create a Space with custom domains.\nkf create-space my-space --domain my-space.my-company.com\n\n# Create a Space that uses unique storage and service accounts.\nkf create-space my-space -container-registry gcr.io/my-project --build-service-account myserviceaccount\n\n# Set running and staging environment variables for Apps and Builds.\nkf create-space my-space --run-env=ENVIRONMENT=nonprod --stage-env=ENVIRONMENT=nonprod,JDK_VERSION=8\n```\n\n### Flags\n\n`--build-service-account=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n\n: Service account that Builds will use.\n\n`--container-registry=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n\n: Container registry built Apps and source code will be stored in.\n\n`--domain=`\u003cvar translate=\"no\"\u003estringArray\u003c/var\u003e\n\n: Sets the valid domains for the Space. The first provided domain is the default.\n\n`-h, --help`\n\n: help for create-space\n\n`--run-env=`\u003cvar translate=\"no\"\u003estringToString\u003c/var\u003e\n\n: Sets the running environment variables for all Apps in the Space.\n\n`--stage-env=`\u003cvar translate=\"no\"\u003estringToString\u003c/var\u003e\n\n: Sets the staging environment variables for all Builds in the Space.\n\n### Inherited flags\n\nThese flags are inherited from parent commands.\n\n`--as=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n\n: Username to impersonate for the operation.\n\n`--as-group=`\u003cvar translate=\"no\"\u003estrings\u003c/var\u003e\n\n: Group to impersonate for the operation. Include this flag multiple times to specify multiple groups.\n\n`--config=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n\n: Path to the Kf config file to use for CLI requests.\n\n`--kubeconfig=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n\n: Path to the kubeconfig file to use for CLI requests.\n\n`--log-http`\n\n: Log HTTP requests to standard error.\n\n`--space=`\u003cvar translate=\"no\"\u003estring\u003c/var\u003e\n\n: Space to run the command against. This flag overrides the currently targeted Space."]]