teectl
Command-Line Tool Reference¶
For the installation of the teectl
command-line tool,
please check the following page: Installing the teectl
command-line tool.
Synopsis¶
Check below the list of commands, with their respective flags.
teectl teectl is a controller for Traefik Enterprise (Enterprise Edition).
Complete documentation is available at https://doc.traefik.io.
Usage: teectl [command] [resource] [flags]
Use "teectl [command] --help" for help on any command.
Commands:
apply Apply configuration to a cluster
get Get resources
create Create resources
delete Delete resources
recover Recovers a cluster that has lost quorum
setup Setup a cluster to manage
support-dump Gather data from the cluster to assist in support
backup Backs up the configuration of a running Traefik Enterprise cluster
restore Restore a previously backed up cluster configuration
version Print version
Resources:
acme-certs, ac
nodes, n
tls-certs, tc
static-config, s
Commands¶
The teectl
command-line (CLI) provides the following commands:
Apply a Configuration (apply)¶
This command applies both static and Traefikee provider configuration to a cluster.
Usage:
teectl apply --file="config.yaml"
Flags:
--cluster
Name of the cluster
--file
Path to the static or Traefik Enterprise Provider configuration file
--force (Default: "false")
Force apply configuration
--socket
Path to the socket
Cluster Management (cluster)¶
Set the Cluster Context (cluster use)¶
This command sets the cluster context to use.
Usage:
teectl cluster use --name="mycluster"
Flags:
--name (Default: "default")
The name of the cluster to set into context
Get Clusters (cluster get)¶
This command gets all clusters configured in teectl
.
Usage:
teectl cluster get
Import a Cluster Configuration (cluster import)¶
This command imports a cluster configuration.
Usage:
teectl cluster import --file="mycluster.yaml"
Flags:
--file
The cluster configuration file to import
Get Resources (get)¶
Get ACME Certificates (get acme-certs)¶
This command gets the ACME certificates from the cluster.
Usage:
teectl get acme-certs
teectl get ac
Flags:
--cluster (Default: "default")
Name of the cluster
--format (Default: "text")
The output format (json | yaml | toml | text)
--notrunc (Default: "false")
Do not truncate output
--socket
Path to the socket
Get Nodes (get nodes)¶
This command gets the nodes of the cluster.
Usage:
teectl get nodes
teectl get n
Flags:
--cluster (Default: "default")
Name of the cluster
--details (Default: "false")
Print details about each node
--format (Default: "text")
The output format (json | yaml | toml | text)
--socket
Path to the socket
Get TLS Certificates (get tls-certs)¶
This command gets the TLS certificates from the cluster.
Usage:
teectl get tls-certs
teectl get tc
Flags:
--cluster (Default: "default")
Name of the cluster
--format (Default: "text")
The output format (json | yaml | toml | text)
--notrunc (Default: "false")
Do not truncate output
--socket
Path to the socket
Get Static Configuration (get static-config)¶
This command gets the current static configuration from the cluster.
Usage:
teectl get static-config
teectl get sc
Flags:
--cluster (Default: "default")
Name of the cluster
--format (Default: "yaml")
The output format (json | yaml | toml)
--socket
Path to the socket
Get Traefik Enterprise Provider Configuration (get traefikee-provider-config)¶
This command gets the current Traefik Enterprise Provider configuration from the cluster.
Usage:
teectl get traefikee-provider-config
teectl get tpc
Flags:
--cluster (Default: "default")
Name of the cluster
--format (Default: "yaml")
The output format (json | yaml | toml)
--socket
Path to the socket
Create a Resource (create)¶
Create TLS certificate (create tls-cert)¶
This command adds a TLS certificate to the cluster.
Usage:
teectl create tls-cert --cert="mycert.crt" --key="mycert.key"
teectl create tc --cert="mycert.crt" --key="mycert.key" --isdefault
Flags:
--cert
PEM-encoded certificate to be used
--cluster
Name of the cluster
--force (Default: "false")
Replace certificate if it already exists
--isdefault (Default: "false")
Serve the given certificate when no other certificate matches the domain
--key
PEM-encoded certificate key to be used
--socket
Path to the socket
Create Credentials (create credentials)¶
This command generates a new set of credentials used to authenticate with the cluster API.
Usage:
teectl create credentials --cluster="mycluster"
Flags:
--cluster
The cluster name
--kubernetes (Default: "false")
Kubernetes configuration
--kubernetes.forwardedport (Default: "0")
Local port to forward the API on
--kubernetes.kubeconfig
Path to the Kubernetes config file (usually located in $HOME/.kube/config)
--kubernetes.namespace (Default: "traefikee")
Kubernetes namespace to install TraefikEE in
--onpremise (Default: "false")
On-Premise configuration
--onpremise.hosts
A comma-separated list of hosts/IPs to connect to the TraefikEE Controller API
on
--onpremise.port (Default: "55055")
The port on which to connect to the TraefikEE Controller API on
--socket
Path to the TraefikEE socket
--swarm (Default: "false")
Swarm configuration
--swarm.hosts
A comma separated list of hosts/IPs to connect to the TraefikEE Controller API
on
--swarm.port (Default: "55055")
The port on which to connect to the TraefikEE Controller API on
Delete a Resource (delete)¶
Delete a Node (delete node)¶
This command demotes and removes a node from the cluster.
Usage:
teectl delete node --id="q01yagt5suwv2tooy8amm248k"
teectl delete n --id="q01yagt5suwv2tooy8amm248k"
Flags:
--cluster (Default: "default")
Name of the cluster
--id
The ID of the node to delete
--socket
Path to the socket
Delete a TLS Certificate (delete tls-cert)¶
This command removes a TLS certificate from the cluster.
Usage:
teectl delete tls-cert --id="s4eg90svby3aty5r6o9xkcpeh"
teectl delete tc --id="s4eg90svby3aty5r6o9xkcpeh"
Flags:
--cluster (Default: "default")
Name of the cluster
--id
The ID of the certificate to delete
--socket
Path to the socket
Delete Traefik Enterprise Provider Configuration (delete traefikee-provider-config)¶
This command removes the current Traefik Enterprise Provider configuration from the cluster.
Usage:
teectl delete traefikee-provider-config
teectl delete tpc
Flags:
--cluster (Default: "default")
Name of the cluster
--socket
Path to the socket
Recover a Cluster (recover)¶
This command recovers a cluster that has lost quorum.
Usage:
teectl recover
Flags:
--cluster (Default: "default")
Name of the cluster
--socket
Path to the socket
Setup a Cluster Connection (setup)¶
This command creates a connection configuration file allowing the teectl
tool
to manage that cluster. It also generates a "bundle.zip" file containing the
server side certificates needed for a secure connection between teectl
and
traefikee
. The bundle can be used to generate (see setup gen)
platform manifest files.
Usage:
teectl setup --cluster="mycluster" --kubernetes
Flags:
--cluster (Default: "default")
The cluster name to install under
--force (Default: "false")
Force the installation to proceed over a previous installation
--kubernetes (Default: "false")
Kubernetes configuration
--kubernetes.forwardedport (Default: "55055")
Local port to forward the API on
--kubernetes.kubeconfig
Path to the Kubernetes config file (usually located in $HOME/.kube/config)
--kubernetes.namespace (Default: "traefikee")
Kubernetes namespace to install Traefik Enterprise in
--onpremise (Default: "false")
On-Premise configuration
--output (Default: "./bundle.zip")
The path to store the installation bundle
--swarm (Default: "false")
Swarm configuration
--swarm.hosts
A comma separated list of hosts/IPs to connect to the Traefik Enterprise Controller API
on
--swarm.port (Default: "55055")
The port on which to connect to the Traefik Enterprise Controller API on
Generate Platform Manifest Files (setup gen)¶
This command generates and outputs platform manifest files to the standard output.
Usage:
# Generate Kubernetes manifest files
teectl setup gen --cluster="mycluster" --controllers=3 --proxies=2 --license="XXX"
# Generate Docker Swarm manifest files
teectl setup gen --cluster="mycluster" --controllers=3 --license="XXX"
teectl setup gen --cluster="mycluster" --proxies=2 --license="XXX"
Flags:
--bundle (Default: "./bundle.zip")
The path to the cluster bundle
--cluster
The cluster name to install under
--controllers (Default: "0")
The number of controllers to install
--license
License key to use
--log.filepath
Log file path. Stdout is used when omitted or empty.
--log.format
Log format: json | common
--log.level
Log level set to restrict logs to logs.
--mesh.kubedns (Default: "false")
Set to true if the cluster uses KubeDNS (This will add CoreDNS
installation files to the installation manifests.)
--proxies (Default: "0")
The number of proxies to install
--swarm.allowmanagers (Default: "false")
(UCP Only) allows installation on both managers and workers
--swarm.assetspath
Path where the UCP assets will be extracted
--swarm.nodes
A comma separated list of swarm node ids to install controllers onto. Auto
detection attempted if empty
--swarm.ucpbundle
Set the path to the ucp-bundle
Patch the cluster DNS (setup patch-dns)¶
This command patches the cluster's DNS for service mesh use in Traefik Enterprise.
Usage:
# Generate Kubernetes manifest files
teectl setup patch-dns --clusterdomain="example.com" --kubeapiaddress="1.2.3.4:6443"
Flags:
--clusterdomain
Domain of the cluster
--kubeconfig
Path to the Kubernetes config file
--kubeserver
Address to the Kubernetes API of the cluster
--verbose (Default: "false")
Show verbose errors
Support Dump (support-dump)¶
This command generates a dump file with information about the Traefik Enterprise cluster.
Usage:
teectl support-dump
# The option `--output` specifies the full path for the output file.
teectl support-dump --output=/tmp/dump.tar.gz
# The option `--cluster` specifies the cluster name.
teectl support-dump --cluster="mycluster"
Flags:
--cluster (Default: "default")
Name of the cluster
--output (Default: "traefikee-support-dump")
Path of the archive to create
--socket
Path to the socket
Backup (backup)¶
This command backs up the configuration of a running cluster.
Usage:
teectl backup
teectl backup --clustername="traefikee-cluster" --output="/tmp/traefikee.zip" --archivetype="zip"
Flags:
--archivetype (Default: "tar")
Type of the archive to create
--cluster (Default: "default")
Name of the cluster
--output (Default: "traefikee-backup")
Path of the archive to create
--socket
Path to the socket
Restore (restore)¶
This command restores the configuration of a cluster from a backup.
Usage:
teectl restore --backup="/tmp/traefikee.zip"
Flags:
--backup (Default: "traefikee-backup.tar")
Path of the archive
--cluster (Default: "default")
Name of the cluster
--force (Default: "false")
Force cluster restoration
--socket
Path to the socket
Show the Version (version)¶
This command shows the Traefik Enterprise version.
Usage:
traefikee version
Flags:
--client (Default: "false")
Print only the version of the client
--cluster (Default: "")
Name of the cluster
--socket (Default: "")
Path to the socket