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/apply.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 the
rancheradd-on may manage local/etc/hosts - whether the
registryadd-on may manage local/etc/hosts - whether the
registryadd-on may install self-signed trust into local Docker
The important public split now is:
./productive-k3s-core.sh applyinstalls the local core only./productive-k3s-core.sh stack install <name>installs an explicit stack such asbase./productive-k3s-core.sh addon installoperates on the local host and local cluster, not on an external kubeconfig target
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_networkrancher_manage_local_hostsregistry_manage_local_hostsregistry_trust_docker
scripts/validate.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¶
PRODUCTIVE_K3S_STACK_NAMEWhen set, validation also runs the selected stack add-on validations. When unset,validate.shbehaves as a core-only validator.
The validator still accepts --docker-registry-test, but the actual registry push/pull check now lives in the registry add-on validation hook. For that optional Docker login path, the validator can consume:
REGISTRY_USERREGISTRY_PASSWORD
scripts/cleanup.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.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.