Install and Upgrade
krateoctl install plan and krateoctl install apply cover the main install and upgrade workflows for Krateo.
planpreviews whatkrateoctlwould do, without talking to the cluster.applyexecutes the workflow against the cluster.
Secrets must be managed separately.
krateoctl does not bootstrap production secrets. Use Vault or create the required Kubernetes Secrets manually before running install or upgrade commands.
See the Secrets Spec for the required names, keys, and namespace rules.
Table Of Contents
When To Use Them
Use these commands when you want to:
- install Krateo from a local
krateo.yaml - upgrade to a tagged release version
- compare the computed plan with the last stored installation snapshot
- run type-specific workflows for
nodeport,loadbalancer, oringress
Release Source
When you pass --version, krateoctl switches to remote mode and fetches files from the releases repository instead of the local filesystem.
The default repository is:
This repository is used as a versioned source of installation assets. krateoctl builds raw GitHub URLs from it and looks for files such as:
krateo.yamlkrateo-overrides.yamlkrateo-overrides.<profile>.yamlpre-upgrade.yamlpre-upgrade.<type>.yamlpost-upgrade.yamlpost-upgrade.<type>.yaml
If you maintain your own release repository, you can point --repository at a GitHub repo with the same layout.
Installation Snapshot
krateoctl saves the resolved installation state as an Installation custom resource in the krateo.io/v1 API group.
The snapshot contains:
- the resolved
componentsDefinition - the computed
steps - the
installationVersionused to build it
By default, the snapshot is stored with the name krateoctl in the install namespace.
How It Is Used
krateoctl install applysaves the snapshot after a successful apply.krateoctl install plan --diff-installedloads the stored snapshot and compares it with the newly computed plan.krateoctl install migrate-fullalso saves the snapshot as part of the automatic migration flow.
Why It Exists
The snapshot gives krateoctl a durable record of what was last computed and applied. That makes it easier to:
- compare a new release against the current state
- detect drift between the installed workflow and the newly computed one
- keep a versioned record of the installation logic that produced the cluster state
Notes
- The snapshot resource is namespaced.
- The CRD is installed automatically by
krateoctl install applyand the migration flow if it is missing. - If the snapshot is not present,
plan --diff-installedreports that it could not find one and continues without a diff.
Secrets
Secrets are managed separately from the install workflow. The recommended approach is to store them in Vault and sync them into Kubernetes.
See the full Secrets Spec for the required names, keys, and namespace rules.
Plan Command
krateoctl install plan is the command that loads the configuration, computes the workflow, and prints the result as multi-document YAML or as a diff summary.
Usage
krateoctl install plan [FLAGS]
Key Flags
--versionrelease tag to fetch from the releases repository--repositorycustom GitHub repository URL for release assets, defaulthttps://github.com/krateoplatformops/releases--configlocal configuration file, defaultkrateo.yaml--profileoptional profile name, such asdevorprod--namespacenamespace where the installation snapshot is stored--typefile variant to use, such asnodeport,loadbalancer, oringress--diff-installedcompare the computed plan against the stored installation snapshot--diff-formatchoose how diffs are rendered; usetablefor a per-step summary view--outputemit the computed plan as YAML to stdout--skip-validationskip configuration validation--debugenable debug logging, or setKRATEOCTL_DEBUG
How It Works
- Loads the main config from
krateo.yamlor from the releases repository when--versionis set. - Applies
krateo-overrides.yamland profile-specific overrides if present. - Selects type-specific files first, then falls back to the generic ones.
- Computes the workflow steps.
- Optionally compares the plan against the last saved installation snapshot.
Examples
# Preview the local installation config
krateoctl install plan
# Preview a specific release version from the default releases repository
krateoctl install plan --version v1.0.0
# Preview from a custom releases repository
krateoctl install plan --version v1.0.0 --repository https://github.com/myorg/krateo-releases
# Compare the plan against the stored snapshot
krateoctl install plan --version v1.0.0 --diff-installed
# Show a step-by-step diff summary in a table
krateoctl install plan --diff-format table
Apply Command
krateoctl install apply is the command that executes the computed workflow against the cluster.
Usage
krateoctl install apply [FLAGS]
Key Flags
--versionrelease tag to fetch from the releases repository--repositorycustom GitHub repository URL for release assets, defaulthttps://github.com/krateoplatformops/releases--configlocal configuration file, defaultkrateo.yaml--namespacetarget namespace--typefile variant to use, such asnodeport,loadbalancer, oringress--profileoptional profile name--skip-validationskip configuration validation--debugenable debug logging, or setKRATEOCTL_DEBUG
What apply Does
- Loads the configuration in local or remote mode.
- Ensures the Installation CRD exists.
- Applies any
pre-upgrademanifests first. - Runs the main workflow steps.
- Applies any
post-upgrademanifests after the workflow completes. - Saves the resulting installation snapshot.
Examples
# Apply from the local configuration
krateoctl install apply
# Apply a tagged release from the default releases repository
krateoctl install apply --version v1.0.0
# Apply a tagged release and use a custom repository
krateoctl install apply --version v1.0.0 --repository https://github.com/myorg/krateo-releases
# Apply with a type-specific layout
krateoctl install apply --config ./krateo.yaml --type ingress
Upgrade Flow
For a normal upgrade, the recommended sequence is:
- Run
krateoctl install plan --version <tag> --diff-installedto compare the target release with the stored installation snapshot. - Review the diff and confirm the upgrade path looks correct.
- Run
krateoctl install apply --version <tag>to perform the upgrade. - Keep
--repositorypointed athttps://github.com/krateoplatformops/releasesunless you mirror the release assets elsewhere. - Use
--typeto match the target environment layout, such asnodeport,loadbalancer, oringress. - Use
--diff-installedwhen you want to compare the computed plan against the stored snapshot before applying.
Notes
- Local mode uses files from disk and is the right fit when you are developing or testing a config change.
- Remote mode uses the releases repository and is the right fit when you are upgrading to an existing tagged release.