Stay organized with collections
Save and categorize content based on your preferences.
You can use the gkectl command line interface for a for a variety tasks,
including the following:
Generate a template for a cluster configuration file.
Validate a cluster configuration file.
Prepare a vSphere environment.
Create a cluster.
Upgrade a cluster.
Update a cluster.
Resize a cluster.
Diagnose cluster issues.
Basic commands
To list all commands:
gkectl help
To get help for a specific command:
gkectl COMMAND --help
Environment variable for the admin cluster kubeconfig file
Several gkectl commands require the path of the admin cluster kubeconfig file.
You can specify the path by exporting a GKECTL_KUBECONFIG environment
variable. For example:
If you do not export the GKECTL_KUBECONFIG environment variable, then you must
use the --kubeconfig flag when you run the command.
Download gkectl
For information on downloading gkectl, see
Downloads.
Default logging behavior for gkectl
For gkectl it's sufficient to use the default logging settings. For gkectl,
the default log file is
/home/ubuntu/.config/gke-on-prem/logs/gkectl-$(date).log, and the file is
symlinked with the logs/gkectl-$(date).log file in the local directory where
you run gkectl.
The default -v5 verbosity level covers all the log entries needed by the
support team. The log file includes the command executed and the failure message.
We recommend that you send the log file to the support team when you need help.
Specifying a non-default locations for log files
To specify a non-default location for the gkectl log file, use the
--log_file flag. The log file that you specify will not be symlinked with the
local directory.
[[["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-25 UTC."],[],[],null,["# gkectl\n\nYou can use the `gkectl` command line interface for a for a variety tasks,\nincluding the following:\n\n- Generate a template for a cluster configuration file.\n- Validate a cluster configuration file.\n- Prepare a vSphere environment.\n- Create a cluster.\n- Upgrade a cluster.\n- Update a cluster.\n- Resize a cluster.\n- Diagnose cluster issues.\n\nBasic commands\n--------------\n\nTo list all commands:\n\n```\ngkectl help\n```\n\nTo get help for a specific command:\n\n```\ngkectl COMMAND --help\n```\n\nEnvironment variable for the admin cluster kubeconfig file\n----------------------------------------------------------\n\nSeveral `gkectl` commands require the path of the admin cluster kubeconfig file.\nYou can specify the path by exporting a `GKECTL_KUBECONFIG` environment\nvariable. For example:\n\n```\nexport GKECTL_KUBECONFIG=/path/to/my-admin-cluster-kubeconfig\n```\n\nIf you do not export the `GKECTL_KUBECONFIG` environment variable, then you must\nuse the `--kubeconfig` flag when you run the command.\n\nDownload `gkectl`\n-----------------\n\nFor information on downloading `gkectl`, see\n[Downloads](/kubernetes-engine/distributed-cloud/vmware/docs/downloads).\n\nDefault logging behavior for `gkectl`\n-------------------------------------\n\nFor `gkectl` it's sufficient to use the default logging settings. For `gkectl`,\nthe default log file is\n`/home/ubuntu/.config/gke-on-prem/logs/gkectl-$(date).log`, and the file is\nsymlinked with the `logs/gkectl-$(date).log` file in the local directory where\nyou run `gkectl`.\n\nThe default `-v5` verbosity level covers all the log entries needed by the\nsupport team. The log file includes the command executed and the failure message.\n\nWe recommend that you send the log file to the support team when you need help.\n\nSpecifying a non-default locations for log files\n------------------------------------------------\n\nTo specify a non-default location for the `gkectl` log file, use the\n`--log_file` flag. The log file that you specify will not be symlinked with the\nlocal directory."]]