gcloud alpha local dev

gcloud alpha local dev - run a service in a development environment
gcloud alpha local dev [--build-context-directory=BUILD_CONTEXT_DIRECTORY] [--builder=BUILDER] [--delete-cluster] [--dockerfile=DOCKERFILE; default="Dockerfile"] [--image-name=IMAGE_NAME] [--local-port=LOCAL_PORT] [--minikube-vm-driver=MINIKUBE_VM_DRIVER; default="kvm2"] [--service-account=SERVICE_ACCOUNT] [--service-name=SERVICE_NAME] [--kind-cluster=KIND_CLUSTER     | --kube-context=KUBE_CONTEXT     | --minikube-profile=MINIKUBE_PROFILE] [GCLOUD_WIDE_FLAG]
(ALPHA) By default, this command runs the user's containers on minikube on the local machine. To run on another kubernetes cluster, use the --kube-context flag.

When using minikube, if the minikube cluster is not running, this command will start a new minikube cluster with that name.

If set, use this as the context directory when building the container image. Otherwise, the directory of the Dockerfile will be used.
Build with a given Cloud Native Computing Foundation Buildpack builder.
If running on minikube or kind, delete the minkube profile or kind cluster at the end of the session.
--dockerfile=DOCKERFILE; default="Dockerfile"
Dockerfile for the service image.
Name for the built docker image.
Local port to which the service connection is forwarded. If this flag is not set, then a random port is chosen.
--minikube-vm-driver=MINIKUBE_VM_DRIVER; default="kvm2"
If running on minikube, use this vm driver.
When connecting to Google Cloud Platform services, use a service account key.
Name of the service.
At most one of these may be specified:
Kind cluster.
Kubernetes context.
Minikube profile.
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.