The GreenNode CLI (grn) is a unified tool to manage your GreenNode services from the command line.
- No dependencies required —
grnis a single binary
Download the latest binary for your platform from GitHub Releases:
macOS / Linux:
# Download (replace OS and ARCH as needed)
curl -L -o grn https://github.com/vngcloud/greennode-cli/releases/latest/download/grn-darwin-arm64
chmod +x grn
sudo mv grn /usr/local/bin/Or build from source:
git clone https://github.com/vngcloud/greennode-cli.git
cd greennode-cli/go
go build -o grn .
sudo mv grn /usr/local/bin/Verify installation:
grn --version
# grn-cli/0.1.0 Go/1.22.2 darwin/arm64Before using the GreenNode CLI, you need to configure your credentials. There are three ways:
Method 1: Environment variables
export GRN_ACCESS_KEY_ID=your-client-id
export GRN_SECRET_ACCESS_KEY=your-client-secret
export GRN_DEFAULT_REGION=HCM-3
export GRN_DEFAULT_PROJECT_ID=pro-xxxxxxxx # optionalMethod 2: Interactive setup (recommended)
grn configureGRN Client ID [None]: <your-client-id>
GRN Client Secret [None]: <your-client-secret>
Default region name [HCM-3]:
Default output format [json]:
Project ID (leave blank to auto-detect) [None]:
Fetching project_id from HCM-3...
Auto-detected project_id: pro-xxxxxxxx
Method 3: Credentials file (manual)
# ~/.greenode/credentials
[default]
client_id = your-client-id
client_secret = your-client-secret# ~/.greenode/config
[default]
region = HCM-3
output = json
project_id = pro-xxxxxxxxCredentials are obtained from the VNG Cloud IAM Portal under Service Accounts.
Credential resolution order: environment variables take priority over the credentials file.
To use multiple profiles:
grn configure --profile staging
grn --profile staging vks list-clustersFor more configuration options, see the Configuration Guide.
The GreenNode CLI uses a multi-part command structure:
grn <service> <command> [options and parameters]For example, to list your VKS clusters:
grn vks list-clustersTo get help on any command:
grn help
grn vks
grn vks create-cluster --helpTo check the version:
grn --versionCluster
list-clusters— List all VKS clustersget-cluster— Get cluster detailscreate-cluster— Create a new VKS clusterupdate-cluster— Update a VKS clusterdelete-cluster— Delete a VKS cluster
Node Group
list-nodegroups— List node groups for a clusterget-nodegroup— Get node group detailscreate-nodegroup— Create a new node groupupdate-nodegroup— Update a node groupupdate-nodegroup-metadata— Update labels, tags, and taints of a node groupupgrade-nodegroup-version— Upgrade the Kubernetes version of a node grouplist-nodes— List nodes in a node groupdelete-nodegroup— Delete a node group
Versions
list-cluster-versions— List available Kubernetes versions
Auto-Upgrade
set-auto-upgrade-config— Configure auto-upgrade schedule for a clusterdelete-auto-upgrade-config— Delete auto-upgrade config for a cluster
Auto-Healing
config-auto-healing— Configure auto-healing for a cluster
Events
get-cluster-events— Get the list of events for a clusterget-nodegroup-events— Get the list of events for a node group
Kubeconfig
generate-kubeconfig— Request generation of a cluster kubeconfigupdate-kubeconfig— Fetch and merge the cluster kubeconfig into your kubeconfig file
Quota
get-quota— Get VKS quota limits and current usage
Waiter
wait cluster-active— Wait until a cluster reaches ACTIVE statuswait cluster-deleted— Wait until a cluster is fully deletedwait nodegroup-active— Wait until a node group reaches ACTIVE statuswait nodegroup-deleted— Wait until a node group is fully deleted
The best way to interact with our team is through GitHub:
- Open an issue — Bug reports and feature requests
- Search existing issues before opening a new one
Apache License 2.0 — see LICENSE.