Skip to content

traefikee Command Line Reference

The "TraefikEE" command line (traefikee) manages the elements in your TraefikEE cluster.

Synopsis

Check below the list of commands, with their respective flags.

Usage: traefikee [flags] <command> [<arguments>]

Use "traefikee <command> --help" for help on any command.

Commands:
        backup                 Deliver a new configuration to the cluster
        bootstrap              Initialize a new cluster
        deploy                 Deliver a new configuration to the cluster
        env                    Print environment variables
        list-nodes             List all nodes of the cluster and their statuses
        rm-node                Remove nodes from the cluster
        start-control-node     Add a new control node to the cluster
        start-data-node        Add a new data node to the cluster
        support                Execute a support command
        update-license         Update the license key of the cluster
        version                Print version

Flag's usage: traefikee [--flag=flag_argument] [-f[flag_argument]] ...     set flag_argument to flag(s)
          or: traefikee [--flag[=true|false| ]] [-f[true|false| ]] ...     set true/false to boolean flag(s)

Commands

The TraefikEE command line (CLI) provides these commands:

Bootstrap Cluster (bootstrap)

This command initializes/recovers a TraefikEE cluster. It starts the first control node which becomes the first leader of the cluster.

Usage:

traefikee bootstrap --advertise="172.17.0.1:4242" --licensekey="XXXX"
traefikee bootstrap --advertise="172.17.0.1:4242" --licensekey="XXXX" --recovercluster --token="YYYY"

Flags:

    --advertise               Address to advertise. Defaults to the address specified by '--listen'
    --api                     Enable cluster API on all Control Nodes                                 (default "false")
    --api.address             Address on which the API listens
    --api.metrics             Enable metrics                                                          (default "false")
    --api.metrics.address     Address on which the data-nodes expose the metrics
    --archivepath             Backup path to restore
    --cleanupperiod           Period to wait between each cluster cleanup.                            (default "5s")
    --clustername             Name of the cluster                                                     (default "traefikee")
-d, --debug                   Enable debug mode                                                       (default "false")
    --expectednodes           Control Node count for bootstrapping cluster                            (default "3")
    --kubernetes              Enables bootstrap token storage in the kubernetes API                   (default "false")
    --kubernetes.bearer       Bearer token to use for API access
    --kubernetes.endpoint     Kubernetes endpoint to use for API access
    --kubernetes.namespace    Namespace to use to store secret in
    --kubernetes.secretname   Name of the secret to store tokens
    --licensekey              Set the license key. Overrides $TRAEFIKEE_LICENSE_KEY
    --listen                  Address to listen on                                                    (default "0.0.0.0:4242")
    --mtlscertsoutputdir      Directory in which traefikeectl api certificates are generated          (default "./.traefikee")
    --recovercluster          RecoverCluster allows restarting a cluster when the it loses the quorum (default "false")
    --sock                    Socket path                                                             (default "/var/run/traefikee.sock")
    --statedir                Directory to save the node state files                                  (default "/var/lib/traefikee_state")
    --swarmmode               Enable swarm mode integration                                           (default "false")
    --swarmmode.licensesecret Name of the swarm secret where the license is stored
    --swarmmode.network       Swarm network to use for the TraefikEE cluster
    --timeout                 Timeout in seconds for bootstrapping cluster. Set to 0 to disable.      (default "120")
    --token                   Token (Required to recover a cluster)
    --traefikeectlapi         Configuration of the Traefikeectl API                                   (default "false")
    --traefikeectlapi.address Traefikeectl API listen address                                         (default ":55055")
    --traefikeectlapi.socket  Traefikeectl API listen socket path                                     (default "/var/run/traefikeectl.sock")
    --traefikeelog            TraefikEE log settings                                                  (default "false")
    --traefikeelog.acme       Log level set to ACME logs
    --traefikeelog.cluster    Log level set to the cluster internal logs
    --traefikeelog.filepath   Traefik log file path. Stdout is used when omitted or empty
    --traefikeelog.format     Traefik log format: json | common
    --traefikeelog.traefik    Log level set to Traefik logs
-h, --help                    Print Help (this message) and exit

Start Control Node (start-control-node)

This command starts a control node and joins it to the TraefikEE cluster.

Usage:

traefikee start-control-node --peeraddresses=172.17.0.1:4242,172.17.0.3:4242,172.17.0.4:4242 --advertise=172.17.0.2:4242 --token="YYYY"

Flags:

    --advertise                 Address to advertise. Defaults to the listen address
-d, --debug                     Enable debug mode                                                               (default "false")
    --listen                    Address to listen on                                                            (default "0.0.0.0:4242")
    --peeraddresses             List of control node addresses to contact to join the cluster (Required to join
                                a cluster)
    --sock                      Socket path                                                                     (default "/var/run/traefikee.sock")
    --statedir                  Directory to save the node state files                                          (default "/var/lib/traefikee_state")
    --swarmmode                 Enable swarm mode integration                                                   (default "false")
    --swarmmode.jointokensecret Name of the swarm secret where the control node join token is stored
    --swarmmode.network         Swarm network to use for the TraefikEE cluster.
    --token                     Cluster token (Required to join a cluster)
    --traefikeelog              TraefikEE log settings                                                          (default "false")
    --traefikeelog.acme         Log level set to ACME logs
    --traefikeelog.cluster      Log level set to the cluster internal logs
    --traefikeelog.filepath     Traefik log file path. Stdout is used when omitted or empty
    --traefikeelog.format       Traefik log format: json | common
    --traefikeelog.traefik      Log level set to Traefik logs
-h, --help                      Print Help (this message) and exit

Start Data Node (start-data-node)

This command starts a data node and joins it to the TraefikEE cluster.

Usage:

traefikee start-data-node --peeraddresses=172.17.0.1:4242,172.17.0.2:4242,172.17.0.3:4242,172.17.0.4:4242 --token="ZZZZ"

Flags:

-d, --debug                     Enable debug mode                                                               (default "false")
    --peeraddresses             List of control node addresses to contact to join the cluster (Required to join
                                a cluster)
    --statedir                  Directory to save the node state files                                          (default "/var/lib/traefikee_state")
    --swarmmode                 Enable swarm mode integration                                                   (default "false")
    --swarmmode.jointokensecret Name of the swarm secret where the control node join token is stored
    --token                     Cluster token (Required to join a cluster)
    --traefikeelog              TraefikEE log settings                                                          (default "false")
    --traefikeelog.acme         Log level set to ACME logs
    --traefikeelog.cluster      Log level set to the cluster internal logs
    --traefikeelog.filepath     Traefik log file path. Stdout is used when omitted or empty
    --traefikeelog.format       Traefik log format: json | common
    --traefikeelog.traefik      Log level set to Traefik logs
-h, --help                      Print Help (this message) and exit

Deploy A Traefik Configuration (deploy)

This command deploys a Traefik configuration on all the TraefikEE cluster nodes.

  • The control nodes use this configuration to set the providers to listen to.
  • The data nodes use this configuration to parametrize the Reverse Proxies.

Usage:

traefikee deploy --kubernetes

Flags:

The deploy command supports all the Traefik flags.

Specific flags are available for TraefikEE:

-s, --sock                                        Socket path                                                                      (default "/var/run/traefikee.sock")
    --traefikeelog                                TraefikEE logger settings                                                        (default "false")
    --traefikeelog.acme                           Log level set to ACME logs
    --traefikeelog.cluster                        Log level set to the cluster internal logs
    --traefikeelog.filepath                       Traefik log file path. It uses the stdout when omitted or empty
    --traefikeelog.format                         Traefik log format: json | common
    --traefikeelog.traefik                        Log level set to Traefik logs
API and Metrics

The flags --api and --metrics have an extended usage in TraefikEE:

  • --api makes the cluster API enabled on all the control nodes
  • --metrics makes the metrics section enabled in the cluster API/dashboard These metrics contain information about all the cluster nodes

Backup a cluster (backup)

This command generates a backup of the state of a TraefikEE cluster.

Usage:

traefikee backup
traefikee backup --statedir='/var/run/traefikee_state'
traefikee backup --archivepath='/mnt/backup/traefikee.backup' --archivetype='zip'

Flags:

    --archivepath Path of the archive to create                                              (default "traefikee-backup")
    --archivetype Type of the archive to create                                              (default "tar")
    --debug       Enable verbose logging                                                     (default "false")
    --force       Force new backup, cancelling already running backup and starting a new one (default "false")
    --socket      Path to the traefikeectl API socket                                        (default "/var/run/traefikeectl.sock")
-h, --help        Print Help (this message) and exit

Show Cluster Nodes (list-nodes)

This command provides a listing of all the TraefikEE cluster nodes.

Usage:

traefikee list-nodes

Flags:

    --details Display a detailed description of the nodes (default "false")
-s, --sock    Socket path.                                (default "/var/run/traefikee.sock")
-h, --help    Print Help (this message) and exit

Set Environment Variables (env)

This command prints the environment variables of the node, including the TraefikEE tokens.

Usage:

traefikee env

Flags:

-s, --sock Socket path                        (default "/var/run/traefikee.sock")
-h, --help Print Help and exit

Remove Node From Cluster (rm-node)

This command removes one or more nodes from the TraefikEE cluster.

Usage:

traefikee rm-node --node=AAAA
traefikee rm-node --down

Flags:

-d, --down If set to true, removes all the nodes down  (default "false")
-n, --node Id of node to remove
-s, --sock Socket path                                 (default "/var/run/traefikee.sock")
-h, --help Print Help and exit

Update the TraefikEE License (update-license)

This command updates the TraefikEE license, without reloading the cluster.

Usage:

traefikee update-license --licensekey=XXXX

Flags:

    --licensekey The new license key for TraefikEE to use
-s, --sock       Socket path                                          (default "/var/run/traefikee.sock")
-h, --help       Print Help and exit

Show version (version)

This command shows the TraefikEE version.

Usage:

traefikee version

Flags:

-h, --help           Print Help and exit