Create and Manage a ZEDEDA Edge Kubernetes Service Cluster Using ZCLI

Introduction

After you create an edge Kubernetes cluster, you can manage it. This article explains how to manage edge Kubernetes cluster instances using the ZEDEDA CLI (ZCLI), including creation, updates, and deletion commands, with examples for each action.

Prerequisites

  • ZCLI v19.2.x or greater is running.
  • You have onboarded one or more edge nodes.
  • Your edge nodes are in the same project.
  • Your edge nodes are online. 
  • Your edge nodes are running the EVE-k v16.0.0 or greater (EVE-OS KVM is not supported).
  • For installation, the edge nodes be of the same hardware type/model with a minimum of 12 core CPUs, 16 GB RAM, and NVMe SSDs for EVE persistent storage for optimal performance. Non-NVMe is not supported.
  • For runtime, EVE-k consumes approximately 4 GB of memory and 2 vCPUs if used for clustering.
  • It recommended, though not strictly required, to separate the management traffic from the cluster traffic. 
  • You have either the SysManager or SysAdmin role in your ZEDEDA Cloud enterprise.
  • This feature is enabled through feature flags. CSadmin level access is required to enable and disable feature flags.

This is a series of articles. You will likely follow them in this order.

  1. ZEDEDA Edge Kubernetes Service and ZEDEDA Edge Kubernetes App Flows Overview 
  2. Create and Manage ZEDEDA Edge Kubernetes Service and App Flows using the API
  3. Create and Manage a ZEDEDA Edge Kubernetes Service Cluster Using the GUI
  4. Create and Manage a ZEDEDA Edge Kubernetes Service Cluster Using ZCLI - You are here!
  5. Manage an App from the ZEDEDA Edge Kubernetes App Flows Marketplace Using the GUI 
  6. Manage ZEDEDA Edge Kubernetes App Flows Installed Applications Using the GUI
  7. Create and Manage ZEDEDA Edge Kubernetes App Flows Cluster Groupings Using the GUI
  8. Create ZEDEDA Edge Kubernetes App Flows GitOps Repositories Using the GUI
    1. ZEDEDA Edge Kubernetes App Flows GitOps Configuration Examples for fleet.yaml
  9. Troubleshoot ZEDEDA Edge Kubernetes Service and App Flows

Create an Edge Kubernetes Cluster

Create an edge Kubernetes cluster from ZCLI.

zcli edge-kubernetes-cluster create <name> --project=<project> --nodes=<node_name:cluster_interface>... [--title=<title>] [--description=<description>] [--tags=<key:value>...] [--cluster-prefix=<cluster-prefix>]
Example
zcli edge-kubernetes-cluster create MY_CLUSTER --project=MY_PROJECT --nodes=MY_NODE1:eth2 --nodes=MY_NODE2:eth2 --nodes=MY_NODE3:eth2

Import an Edge Kubernetes Cluster

Import an existing edge Kubernetes cluster into a project.

zcli edge-kubernetes-cluster import <name> --project=<project> [--title=<title>] [--description=<description>] [--tags=<key:value>...]
Example
zcli edge-kubernetes-cluster import MY_CLUSTER --project=MY_PROJECT --title="My Imported Cluster"

Add Nodes to an Edge Kubernetes Cluster

Add one or more edge nodes to an existing edge Kubernetes cluster.

zcli edge-kubernetes-cluster add-nodes <name> --nodes=<node_name:cluster_interface>...
Example
zcli edge-kubernetes-cluster add-nodes MY_CLUSTER --nodes=MY_NEW_NODE:eth2

Remove Nodes from an Edge Kubernetes Cluster

Remove one or more edge nodes from an existing edge Kubernetes cluster.

zcli edge-kubernetes-cluster remove-nodes <name> --nodes=<node_name>...
Example
zcli edge-kubernetes-cluster remove-nodes MY_CLUSTER --nodes=MY_NODE3

Generate a Kubeconfig

Generate a kubeconfig file for an edge Kubernetes cluster. You can use this file to authenticate and interact with the cluster using standard Kubernetes tooling.

zcli edge-kubernetes-cluster generate-kubeconfig [<name> | --uuid=<uuid>]
Example
zcli edge-kubernetes-cluster generate-kubeconfig MY_CLUSTER

Update Tags on an Edge Kubernetes Cluster

Update the tags on an existing edge Kubernetes cluster.

zcli edge-kubernetes-cluster update-tags <name> --tags=<key:value>...
Example
zcli edge-kubernetes-cluster update-tags MY_CLUSTER --tags=env:production --tags=region:us-west

Delete an Edge Kubernetes Cluster

After you add an edge Kubernetes cluster, you can delete it if you no longer need it. When the cluster is deleted, every node in the cluster reboots and reconfigures itself to single node mode.

zcli edge-kubernetes-cluster delete <name>
Example
zcli edge-kubernetes-cluster delete MY_CLUSTER

Upgrade an Edge Kubernetes Cluster

After you add an edge Kubernetes cluster, you can upgrade the EVE-OS (Edge Virtualization Engine) image on each node. Upgrade EVE-OS from a single operation at the edge Kubernetes cluster level instead of using the edge-node eveimage-update operation. This ensures only one cluster node is taken down at a time.

zcli edge-kubernetes-cluster upgrade <name> --image=<image>
Example
zcli edge-kubernetes-cluster upgrade MY_CLUSTER --image=XXXXXXX

Upgrade the K3s Version on an Edge Kubernetes Cluster

Upgrade the K3s (lightweight Kubernetes) version on an edge Kubernetes cluster. This command should only be used in offline mode during a maintenance outage window, as Kubernetes will immediately terminate on the node, download the new version, and restart.

zcli edge-kubernetes-cluster k3s-upgrade <name> --version=<version>
Example
# Should only be done in offline mode during a maintenance outage window.
zcli edge-kubernetes-cluster k3s-upgrade MY_CLUSTER --version=v1.34.2+k3s1

View Edge Kubernetes Cluster Status

View the current status of an edge Kubernetes cluster.

zcli edge-kubernetes-cluster status [<name> | --uuid=<uuid>]
Example
zcli edge-kubernetes-cluster status MY_CLUSTER

Show Edge Kubernetes Cluster Status

The show command is an alias for status. The response payload might change in the future and become different from the status command.

zcli edge-kubernetes-cluster show [<name> | --uuid=<uuid>]
Example
zcli edge-kubernetes-cluster show MY_CLUSTER

View Edge Kubernetes Cluster Metrics

View metrics for an edge Kubernetes cluster, including resource utilization data for the cluster and its nodes.

zcli edge-kubernetes-cluster metrics [<name> | --uuid=<uuid>]
Example
zcli edge-kubernetes-cluster metrics MY_CLUSTER

View Available K3s Versions

View the K3s versions available for an edge Kubernetes cluster.

zcli edge-kubernetes-cluster k3s-versions [<name> | --uuid=<uuid>]
Example
zcli edge-kubernetes-cluster k3s-versions MY_CLUSTER

View Registration Commands

View the registration commands required to join additional nodes to an edge Kubernetes cluster.

zcli edge-kubernetes-cluster registration-commands [<name> | --uuid=<uuid>]
Example
zcli edge-kubernetes-cluster registration-commands MY_CLUSTER

Next Steps

This is a series of articles. You will likely follow them in this order.

  1. ZEDEDA Edge Kubernetes Service and ZEDEDA Edge Kubernetes App Flows Overview 
  2. Create and Manage ZEDEDA Edge Kubernetes Service and App Flows using the API
  3. Create and Manage a ZEDEDA Edge Kubernetes Service Cluster Using the GUI
  4. Create and Manage a ZEDEDA Edge Kubernetes Service Cluster Using ZCLI - You are here!
  5. Manage an App from the ZEDEDA Edge Kubernetes App Flows Marketplace Using the GUI 
  6. Manage ZEDEDA Edge Kubernetes App Flows Installed Applications Using the GUI
  7. Create and Manage ZEDEDA Edge Kubernetes App Flows Cluster Groupings Using the GUI
  8. Create ZEDEDA Edge Kubernetes App Flows GitOps Repositories Using the GUI
    1. ZEDEDA Edge Kubernetes App Flows GitOps Configuration Examples for fleet.yaml
  9. Troubleshoot ZEDEDA Edge Kubernetes Service and App Flows

After you complete the series, you might be interested in the following articles.

Was this article helpful?
0 out of 0 found this helpful