Skip to main content
Use the ZEDEDA CLI (ZCLI) to manage ZEDEDA Edge Kubernetes Service cluster groups from the command line. This article covers zcli edge-kubernetes-cluster-group commands, with syntax and examples for each operation. A cluster group (called a cluster grouping in the Edge Infrastructure Services console) is a named collection of ZEDEDA Edge Kubernetes Service clusters in a project. You can check the health of every member cluster, and of the resources deployed to them, in one place. A cluster belongs to a group when its tags match the labels in the group’s selector. The selector is part of the cluster group manifest, a JSON document that you pass when you create the group. Cluster groups contain ZEDEDA Edge Kubernetes Service clusters, which you create with zcli edge-kubernetes-cluster. See Manage ZEDEDA Edge Kubernetes Service Clusters. Those clusters run on node clusters, which you manage with zcli edge-node-cluster. See Manage Node Clusters. For the console workflow and the meaning of each status, see Manage Kubernetes Cluster Groupings.

Before You Start

  • ZCLI is installed and authenticated against your enterprise. See Get Started.
  • You have a role that allows you to manage ZEDEDA Edge Kubernetes Service resources in the project. [TBD: confirm the minimum role required to create and delete cluster groups with ZCLI. Managing ZEDEDA Edge Kubernetes Service clusters requires the SysManager or SysAdmin role.]
  • The project exists, and the clusters that you want in the group have the tags that the group selects on. See Manage ZEDEDA Edge Kubernetes Service Clusters.
Cluster groups cannot be changed after you create them. ZCLI has no update command for cluster groups. To change a group, delete it and create it again.

Generate a Cluster Group Manifest

Edge Infrastructure Services generates the cluster group manifest for you from the group name, the project, and the tags that member clusters must have.
Example:
The generated manifest has the following form. The namespace is set by Edge Infrastructure Services for your enterprise and project, and matchLabels lists the tags that you passed.
In the current ZCLI, manifest retrieves the manifest but does not print it, so the command shows no output. To see the manifest, add the global --debug flag, and copy the yamlContent value from the HTTP Response line:
The --debug output includes your session token in the Request-Headers line. Do not share or save this output.
ZCLI sends each --tags value to Edge Infrastructure Services as a separate query parameter. Check that the matchLabels object in the returned manifest contains your tags before you create the group. [TBD: confirm with engineering that the manifest endpoint applies tags passed this way. The API documents a single tags parameter.]
The --help text for this command shows examples with --uuid and without --project. Those examples fail, because manifest requires --project and does not accept --uuid.

Create a Cluster Group

Example, with the manifest passed inline:
To pass a manifest that you saved in a file, use command substitution in the ZCLI shell:
create prints nothing when it succeeds. To confirm that the group exists, see View Cluster Group Status.
ZCLI does not check the project name. If the project does not exist, ZCLI still sends the request, with an empty project ID. Check the project name with zcli project show before you create the group. If a --tags value is not in key:value format, ZCLI prints Please provide tag values as key-value pairs. Example: region:India and does not create the group.

View Cluster Group Status

You must pass either a name or --uuid. Without either, ZCLI prints ERROR: Please provide either Edge-Kubernetes Cluster Group name or UUID. Example:
The output shows the following information for each matching cluster group:
  • The cluster group name, ID, title, project, description, state, namespace, age, and tags.
  • Cluster Readiness, the number of ready member clusters out of the total.
  • A resources summary that counts deployed resources by state: Ready, Not Ready, Missing, Modified, Orphaned, Unknown, and Wait Applied. For the meaning of each state, see Manage Kubernetes Cluster Groupings.
  • A table of member clusters with the columns Name, State, BundleReady, ReposReady, Resources, LastSeen, and Created.
To get the full status record as JSON, add the global --format=json flag:

Delete a Cluster Group

Example:
delete removes the cluster group immediately. There is no confirmation prompt and no -f flag. The command prints nothing when it succeeds.
Deleting a cluster group does not affect the clusters that were members of the group. If no cluster group has the name, ZCLI prints ERROR: Edge-Kubernetes Cluster <name> not found. The message says “Cluster”, but it refers to the cluster group.

Next Steps

Manage ZEDEDA Edge Kubernetes Service Clusters

Create the clusters, and set the tags that cluster groups select on.

Manage Kubernetes Cluster Groupings

Create and monitor cluster groupings in the Edge Infrastructure Services console.

Manage Node Clusters

Manage the node clusters that ZEDEDA Edge Kubernetes Service clusters run on.

Get Started

Install ZCLI, configure access to Edge Infrastructure Services, and sign in.