gcloud alpha code export

gcloud alpha code export - writes skaffold and kubernetes files for local development
gcloud alpha code export [--build-context-directory=BUILD_CONTEXT_DIRECTORY] [--cloudsql-instances=[CLOUDSQL_INSTANCE,…]] [--cpu-limit=CPU_LIMIT] [--image-name=IMAGE_NAME] [--kubernetes-file=KUBERNETES_FILE; default="pods_and_services.yaml"] [--local-port=LOCAL_PORT] [--memory-limit=MEMORY_LIMIT] [--service-name=SERVICE_NAME] [--application-default-credential     | --service-account=SERVICE_ACCOUNT] [--builder=BUILDER     | --dockerfile=DOCKERFILE; default="Dockerfile"] [--env-vars=[KEY=VALUE,…]     | --env-vars-file=FILE_PATH] [--skaffold-file=SKAFFOLD_FILE; default="skaffold.yaml"     | --no-skaffold-file] [GCLOUD_WIDE_FLAG]
(ALPHA) Writes skaffold and kubernetes yaml that builds a docker image and runs it locally. In order to build and run the image, run

> skaffold dev

This command should be used if there is a need to make customizations to the development environment. Otherwise, the gcloud local dev command should be used instead.

If set, use this as the context directory when building the container image. If not specified, the current directory is used.
Cloud SQL instance connection strings. Must be in the form <project>:<region>:<instance>.
Container CPU limit. Limit is expressed as a number of CPUs. Fractional CPU limits are allowed (e.g. 1.5).
Name for the built docker image.
--kubernetes-file=KUBERNETES_FILE; default="pods_and_services.yaml"
File containing yaml specifications for kubernetes resources.
Local port to which the service connection is forwarded. If this flag is not set, then a random port is chosen.
Container memory limit. Limit is expressed either as an integer representing the number of bytes or an integer followed by a unit suffix. Valid unit suffixes are "B", "KB", "MB", "GB", "TB", "KiB", "MiB", "GiB", "TiB", or "PiB".
Name of the service.
At most one of these may be specified:
When connecting to Google Cloud Platform services, use the application default credential.
When connecting to Google Cloud Platform services, use a service account key.
At most one of these may be specified:
Build with a given Cloud Native Computing Foundation Buildpack builder.
--dockerfile=DOCKERFILE; default="Dockerfile"
Dockerfile for the service image.
At most one of these may be specified:
List of key-value pairs to set as environment variables.
Path to a local YAML file with definitions for all environment variables.
At most one of these may be specified:
--skaffold-file=SKAFFOLD_FILE; default="skaffold.yaml"
Location of the generated skaffold.yaml file.
Do not produce a skaffold.yaml file.
These flags are available to all commands: --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.

This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you may be trying to access an API with an invitation-only early access whitelist.