Stay organized with collectionsSave and categorize content based on your preferences.
You can use thegkectlcommand 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:
gkectlCOMMAND--help
Environment variable for the admin cluster kubeconfig file
Severalgkectlcommands require the path of the admin cluster kubeconfig file.
You can specify the path by exporting aGKECTL_KUBECONFIGenvironment
variable. For example:
If you do not export theGKECTL_KUBECONFIGenvironment variable, then you must
use the--kubeconfigflag when you run the command.
Downloadgkectl
For information on downloadinggkectl, seeDownloads.
Default logging behavior forgkectl
Forgkectlit's sufficient to use the default logging settings. Forgkectl,
the default log file is/home/ubuntu/.config/gke-on-prem/logs/gkectl-$(date).log, and the file is
symlinked with thelogs/gkectl-$(date).logfile in the local directory where
you rungkectl.
The default-v5verbosity 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 thegkectllog file, use the--log_fileflag. 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-09-04 UTC."],[],[],null,["You 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\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\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\nFor information on downloading `gkectl`, see\n[Downloads](/kubernetes-engine/distributed-cloud/vmware/docs/downloads).\n\nDefault logging behavior for `gkectl`\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\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."]]