Skip to content

Fabric CLI

Under construction.

Currently Fabric CLI is represented by a kubectl plugin kubectl-fabric automatically installed on the Control Node. It is a wrapper around kubectl and Kubernetes client which allows to manage Fabric resources in a more convenient way. Fabric CLI only provides a subset of the functionality available via Fabric API and is focused on simplifying objects creation and some manipulation with the already existing objects while main get/list/update operations are expected to be done using kubectl.

core@control-1 ~ $ kubectl fabric
   hhfctl - Hedgehog Fabric user client

   hhfctl [global options] command [command options] [arguments...]


   vpc                VPC commands
   switch, sw, agent  Switch/Agent commands
   connection, conn   Connection commands
   switchgroup, sg    SwitchGroup commands
   external           External commands
   help, h            Shows a list of commands or help for one command

   --verbose, -v  verbose output (includes debug) (default: true)
   --help, -h     show help
   --version, -V  print the version


Create VPC named vpc-1 with subnet and VLAN 1001 with DHCP enabled and DHCP range starting from (optional):

core@control-1 ~ $ kubectl fabric vpc create --name vpc-1 --subnet --vlan 1001 --dhcp --dhcp-start

Attach previously created VPC to the server server-01 (which is connected to the Fabric using the server-01--mclag--leaf-01--leaf-02 Connection):

core@control-1 ~ $ kubectl fabric vpc attach --vpc-subnet vpc-1/default --connection server-01--mclag--leaf-01--leaf-02

To peer VPC with another VPC (e.g. vpc-2) use the following command:

core@control-1 ~ $ kubectl fabric vpc peer --vpc vpc-1 --vpc vpc-2

Last update: February 8, 2024
Created: October 26, 2023