Skip to content

mkectl node

mkectl node#

Manage cluster nodes

Options#

      --bastion-ssh-key string           Specify the ssh key file for bastion host to be used to connect to existing cluster's controller host
                                         (when MKEConfig specifies one for that controller). Controller is picked from MKEConfig as first entry 
                                         with configured SSH. Same precedence and scope as --ssh-key. Has no effect when the chosen controller
                                         has no bastion configured in MKEConfig.
                                         Does NOT override the per-worker/cp bastion key in hosts.yaml.
      --collect-facts-timeout duration   Timeout for the collect-facts phase (gathering per-host facts such as cgroup version over SSH) (default 5m0s)
      --concurrency int                  Maximum number of nodes to configure in parallel, set to 0 for unlimited (default 30)
      --dry-run                          Simulate the node operations without making any changes
      --force                            Bypass user confirmations. This will apply changes without any confirmations
  -h, --help                             help for node
      --hosts-path string                path to the hosts config file (default "hosts.yaml")
      --include-logs                     Write a sidecar <name>.log next to the backup capturing the backup run's operation log (the log is not encrypted)
      --lease-adopt-stale                if true, matching stale lease would be adopted instead of failing with error
      --lease-renew-interval duration    lease renew interval for cluster-wide/node operations, should be < leaseTTL (default 20s)
      --lease-ttl duration               lease TTL for cluster-wide/node operations (default 1m0s)
      --name string                      Name of the snapshot to create (default "backup.tar")
      --no-passphrase                    Opt out to encrypt the tar file with a passphrase (not recommended)
      --passphrase string                Encrypt the tar file with a passphrase (at least 12 characters). Use "-" to read it from stdin instead of the command line
      --progress-bars                    Enable progress bars during snapshot creation (default true)
      --scope string                     The scope of the command. Valid values: 'worker,controller+worker'. This defines the role based filter for entries in hosts.yaml. The filtered list will be used as target hosts for the command. (default "worker")
      --skip-snapshot                    Skip taking etcd-snapshot before and after adding/removal managers. Not used for workers scope.
      --ssh-key string                   Specify the ssh key file to be used to connect to existing cluster's controller host. Controller is picked from 
                                         MKEConfig as first entry with configured SSH. If specified, overrides the keyPath stored in MKEConfig 
                                         for that controller; the file must exist locally. Required when MKEConfig's controller keyPath is empty
                                         or not present on this machine.
                                         Does NOT affect SSH keys for the new workers/cp nodes being added — those come from hosts.yaml only.
      --temp-dir string                  Directory on the controller where k0s stages the etcd snapshot while the backup is taken; it needs free space at least the size of the etcd database. Overrides spec.backup.tempDir; when both are empty k0s uses /tmp
      --timeout-minutes int              Use specified timeout (in minutes) for node operations. If 0, then wait indefinitely. (default 60)
      --wait                             If the node's etcd-maintenance operation lock is held by another operation (defrag, cleanup, quota recovery, or a scheduled backup), wait for it to be released instead of failing fast

Options inherited from parent commands#

  -f, --file string              path to the config file. Not needed for restore where config is loaded from the backup (default "mke4.yaml")
      --kubeconfig string        path to the kubeconfig file of the existing or restored cluster. DO NOT USE when creating a new cluster (default "/home/runner/.mke/mke.kubeconf")
  -l, --logLevel string          specify a log level (info, warn, debug, trace, error) (default "info")
      --no-color                 when provided, disables colored output
      --no-pretty-print          when provided, disables pretty print output formatting
      --version version[=true]   --version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version