Scripts Parameters¶
This page summarizes the main operator-facing CLI options and environment-backed parameters exposed by the repository scripts.
scripts/preflight-host.sh¶
CLI options¶
| Option | Meaning |
|---|---|
--mode <single-node|server|agent|stack> |
Evaluate the host against the selected runtime profile |
--strict |
Exit non-zero on warnings as well as failures |
--json-output |
Emit machine-readable JSON instead of human-readable output |
-h, --help |
Show CLI help |
What it checks¶
The host preflight validates:
- supported OS and version
- supported CPU architecture
systemdas PID 1- required commands for the bootstrap or release install path
- sudo posture
- published hardware guidance for
single-nodeandstack
For server and agent, it still captures the host resource snapshot, but it does not enforce the same full-stack sizing guidance.
At the moment, the public support baseline includes amd64/x86_64 and Ubuntu 24.04 on arm64/aarch64. The preflight accepts both families for the currently supported Ubuntu and Debian targets, while the retained ARM validation evidence is specific to Ubuntu 24.04.
scripts/bootstrap-k3s-stack.sh¶
CLI options¶
| Option | Meaning |
|---|---|
--dry-run |
Plan the bootstrap without applying changes |
--mode <single-node|server|agent|stack> |
Select the execution mode |
-h, --help |
Show CLI help |
Mode-sensitive inputs¶
The bootstrap is mostly interactive. The script prompts for values depending on detected state and selected mode.
Common prompted values include:
Agent server URLAgent cluster tokenBase domainRancher hostnameRancher bootstrap passwordRegistry hostnameRegistry PVC sizeRegistry StorageClassRegistry auth enabled, username, and password- TLS choice:
Let's EncryptorSelf-signed Let's Encrypt emailLet's Encrypt environmentLonghorn data mount pathLonghorn default replica countLonghorn storage minimal available percentageNFS export pathNFS allowed client network/CIDR- whether to manage local
/etc/hosts - whether to trust the self-signed registry in local Docker
Telemetry-related environment variables¶
The bootstrap script reads these environment variables:
TELEMETRY_ENABLEDTELEMETRY_ENDPOINTDefault:https://telemetry.productive-k3s.io/telemetryTELEMETRY_MARKERTELEMETRY_BEARER_TOKENTELEMETRY_MAX_RETRIESTELEMETRY_CONNECT_TIMEOUT_SECONDSTELEMETRY_REQUEST_TIMEOUT_SECONDSTELEMETRY_OUTBOX_DIRTELEMETRY_USER_AGENTTELEMETRY_SESSION_IDTELEMETRY_RUN_IDTELEMETRY_PARENT_RUN_IDTELEMETRY_COMPONENT
Engine-related environment variables¶
The bootstrap script also reads:
PRODUCTIVE_K3S_ENGINE:nativeork3sup. Default:native.
When the experimental k3sup engine is used in orchestrated split-mode flows, the wrapper layer may also provide:
PRODUCTIVE_K3S_SSH_HOSTPRODUCTIVE_K3S_SSH_USERPRODUCTIVE_K3S_SSH_PORTPRODUCTIVE_K3S_SSH_KEY_PATHPRODUCTIVE_K3S_SSH_EXTRA_OPTS
Persisted run settings¶
The bootstrap manifest records settings such as:
bootstrap_modek3s_installation_engineagent_server_url_providedagent_cluster_token_providedbase_domainrancher_hostregistry_hosttls_modeletsencrypt_environmentlonghorn_data_pathlonghorn_replica_countlonghorn_minimal_available_percentagelonghorn_single_node_moderegistry_pvc_sizeregistry_storage_classregistry_auth_enablednfs_managenfs_export_pathnfs_allowed_networkmanage_local_hoststrust_registry_in_docker
scripts/validate-k3s-stack.sh¶
CLI options¶
| Option | Meaning |
|---|---|
--strict |
Exit non-zero on warnings as well as failures |
--json |
Emit machine-readable JSON |
--docker-registry-test |
Run docker push/pull validation against registry.home.arpa |
-h, --help |
Show CLI help |
Related environment variables¶
For the optional Docker login path, the validator can consume:
REGISTRY_USERREGISTRY_PASSWORD
scripts/clean-k3s-stack.sh¶
CLI options¶
| Option | Meaning |
|---|---|
--plan |
Show the cleanup plan only |
--apply |
Apply the destructive cleanup |
--yes |
Auto-approve the yes/no prompt |
--confirm-clean |
Auto-approve the typed CLEAN confirmation |
-h, --help |
Show CLI help |
scripts/rollback-k3s-stack.sh¶
CLI options¶
| Option | Meaning |
|---|---|
--to <file> |
Bootstrap run manifest JSON to evaluate |
--plan |
Show the rollback plan only |
--apply |
Execute the safe rollback actions derived from the manifest |
--yes |
Auto-approve apply without prompting |
-h, --help |
Show CLI help |
scripts/send-telemetry.sh¶
This helper consumes:
- positional
MANIFEST_PATH TELEMETRY_ENDPOINTDefault:https://telemetry.productive-k3s.io/telemetryTELEMETRY_MARKERTELEMETRY_BEARER_TOKENTELEMETRY_MAX_RETRIESTELEMETRY_CONNECT_TIMEOUT_SECONDSTELEMETRY_REQUEST_TIMEOUT_SECONDSTELEMETRY_OUTBOX_DIRTELEMETRY_USER_AGENTTELEMETRY_ENABLEDTELEMETRY_SESSION_IDTELEMETRY_RUN_IDTELEMETRY_PARENT_RUN_IDTELEMETRY_COMPONENTTELEMETRY_SOURCE_REPOSITORYTELEMETRY_SOURCE_SCRIPTTELEMETRY_EXIT_CODE
scripts/send-telemetry-event.sh¶
This helper consumes:
- positional
PAYLOAD_PATH TELEMETRY_ENDPOINTDefault:https://telemetry.productive-k3s.io/telemetryTELEMETRY_MARKERTELEMETRY_BEARER_TOKENTELEMETRY_MAX_RETRIESTELEMETRY_CONNECT_TIMEOUT_SECONDSTELEMETRY_REQUEST_TIMEOUT_SECONDSTELEMETRY_OUTBOX_DIRTELEMETRY_RUN_ID
Notes¶
Note
The bootstrap script is intentionally interactive. Most installation choices are prompted at runtime rather than passed as a large flag surface.
Note
The host preflight is a compatibility check, not an installer. It tells you whether the target looks aligned with the supported platform assumptions before bootstrap starts making changes.
Note
If you need machine-driven orchestration, the mode split plus the recorded manifest settings are the most stable integration points today.