Kilo provides a command line tool for inspecting and interacting with clusters:
This tool can be used to understand a mesh's topology, get the WireGuard configuration for a peer, or graph a cluster.
kgctl requires a Kubernetes configuration file to be provided, either by setting the
KUBECONFIG environment variable or by providing the
kgctl currently requires building the binary from source.
Note: the Go toolchain must be installed in order to build the binary.
To build and install
kgctl, simply run:
|graph||Produce a graph in GraphViz format representing the topology of the cluster.|
|showconf||Show the WireGuard configuration for a node or peer in the mesh.|
graph command generates a graph in GraphViz format representing the Kilo mesh.
This graph can be helpful in understanding or debugging the topology of a network.
This will produce some output in the DOT graph description language, e.g.:
To render the graph, use one of the GraphViz layout tools, e.g.
This will generate an SVG like:
showconf command outputs the WireGuard configuration for a node or peer in the cluster, i.e. the configuration that the node or peer would need to set on its local WireGuard interface in order to participate in the mesh.
This will produce some output in INI format, e.g.
--as-peer flag modifies the behavior of the command so that it outputs the configuration that a different WireGuard interface would need in order to communicate with the specified node or peer.
When further combined with the
--output yaml flag, this command can be useful to register a node in one cluster as a peer of another cluster, e.g.: