Manage OKE with Flux
Operate OKE through Git. Treat Git as desired state and Flux/Kubernetes as
observation surfaces. Do not repair managed objects directly.
Start every task
- Locate the repository and run
scripts/preflight.sh [path].
- Identify the target cluster, namespace, application, component, and
environment. Do not guess when ambiguity changes placement.
- Classify the request with references/use-cases.md.
- Read references/repository-contracts.md.
- Read only the task-specific reference:
- local platform or developer application:
references/applications.md;
- decentralized member or profile:
references/fleet.md;
- failure, pruning, or rollback:
references/operations.md.
- Apply references/safety.md before editing or running
a command that changes external state.
Repository ownership
For stack scope, bootstrap credentials, IAM placement, or upgrades, read
references/bootstrap.md. In cluster_admin,
apps-config is absent by design; do not create its source or developer
placements unless the user explicitly enables application management.
cluster-config: one primary cluster's bootstrap, Flux self-management,
cluster resources (including every resource rendered into kube-system),
namespace infrastructure, and local placement.
apps-config: reusable developer components and exactly dev, staging,
and production variants. It never selects a cluster.
fleet-config: optional shared profiles and explicit per-cluster activation.
Every member runs its own Flux controllers and pulls Git independently.
gitops-pipelines: OCI DevOps mirroring and agent installation. Do not place
Kubernetes desired state here.
If a request crosses repositories, make one coherent change per repository,
validate each independently, and state the required merge order.
Change workflow
- Update the clone from
main without discarding user changes.
- Inspect the relevant ResourceSet, Kustomization, HelmRelease, source, and
every referenced path.
- Prefer the existing ResourceSet/input contract. Do not bypass it with
unrelated controller objects or direct workload application.
- Make the smallest coherent change. Preserve component/environment as the
reconciliation and rollback boundary.
- Run
scripts/validate.sh [repository-root].
- Run
scripts/impact.sh [repository-root] [base-ref]. Review deletions,
ResourceSet input removals, Kustomization reference removals, namespace
changes, source changes, and profile activation changes.
- Compare each changed deployment unit:
- Kustomize:
scripts/diff-kustomize.sh <repo> <overlay-path> [base-ref];
- umbrella Helm:
scripts/diff-helm-selection.sh <repo> <app> <component> <environment> [base-ref].
An object appearing in a complete render is not proof that it changed.
- Show planned resources and pruning impact before destructive or externally
mutating operations.
- Do not push, merge, run a pipeline, apply bootstrap, modify IAM, or mutate a
cluster unless the user authorized it.
- After merge, observe the local Flux graph and workload. Correct or revert
Git when desired state is wrong.
Validation rules
- Render every changed Kustomize root with
kubectl kustomize.
- For umbrella Helm, lint and template every affected component/environment
using global values first and the selected values file last.
- Inspect names, namespaces, labels, images, requests, and duplicate identities.
- Verify each Helm environment file enables exactly one subchart.
- Never render, decode, or print secret values into logs.
- A live dry-run is optional; local rendering remains mandatory.
Observe Flux
Run against the target cluster, not an assumed hub:
kubectl -n flux-system get fluxinstance,resourceset
kubectl -n flux-system get gitrepository,kustomization,helmrelease
kubectl -n flux-system describe kustomization <name>
Expect every relevant object to report Ready=True. Additional members have
only fleet-config and, in the full application scope, apps-config sources; the primary also has
cluster-config. Read conditions and events before changing Git.
Report every result
Include the target cluster, namespace, application, component and environment;
all created/modified/deleted files; validation results; proven changed and
pruned Kubernetes identities; external actions performed or still requiring
authorization; and the exact Git revert procedure.
Use assets/ only as starting points. Replace every __TOKEN__, inspect the
result, and adapt it before committing. Read
references/templates.md first.
1---2name: manage-oke-with-flux3description: Manage Oracle Kubernetes Engine clusters through this solution's decentralized Flux GitOps repositories. Use for bootstrapping or observing Flux, changing cluster-scoped or namespaced resources, deploying Helm charts, managing environment-aware Kustomize or umbrella-Helm applications, releasing one component, using OCI Vault ExternalSecrets, onboarding or configuring independent fleet members, validating changes, analyzing pruning impact, troubleshooting reconciliation, and rolling back through Git in cluster-config, apps-config, or fleet-config.4metadata:5 source: https://skillmd.com/skills/oracle-devrel/manage-oke-with-flux6---78# Manage OKE with Flux910Operate OKE through Git. Treat Git as desired state and Flux/Kubernetes as11observation surfaces. Do not repair managed objects directly.1213## Start every task14151. Locate the repository and run `scripts/preflight.sh [path]`.162. Identify the target cluster, namespace, application, component, and17 environment. Do not guess when ambiguity changes placement.183. Classify the request with [references/use-cases.md](references/use-cases.md).194. Read [references/repository-contracts.md](references/repository-contracts.md).205. Read only the task-specific reference:21 - local platform or developer application:22 [references/applications.md](references/applications.md);23 - decentralized member or profile:24 [references/fleet.md](references/fleet.md);25 - failure, pruning, or rollback:26 [references/operations.md](references/operations.md).276. Apply [references/safety.md](references/safety.md) before editing or running28 a command that changes external state.2930## Repository ownership3132For stack scope, bootstrap credentials, IAM placement, or upgrades, read33[references/bootstrap.md](references/bootstrap.md). In `cluster_admin`,34`apps-config` is absent by design; do not create its source or developer35placements unless the user explicitly enables application management.3637- `cluster-config`: one primary cluster's bootstrap, Flux self-management,38 cluster resources (including every resource rendered into `kube-system`),39 namespace infrastructure, and local placement.40- `apps-config`: reusable developer components and exactly `dev`, `staging`,41 and `production` variants. It never selects a cluster.42- `fleet-config`: optional shared profiles and explicit per-cluster activation.43 Every member runs its own Flux controllers and pulls Git independently.44- `gitops-pipelines`: OCI DevOps mirroring and agent installation. Do not place45 Kubernetes desired state here.4647If a request crosses repositories, make one coherent change per repository,48validate each independently, and state the required merge order.4950## Change workflow51521. Update the clone from `main` without discarding user changes.532. Inspect the relevant ResourceSet, Kustomization, HelmRelease, source, and54 every referenced path.553. Prefer the existing ResourceSet/input contract. Do not bypass it with56 unrelated controller objects or direct workload application.574. Make the smallest coherent change. Preserve component/environment as the58 reconciliation and rollback boundary.595. Run `scripts/validate.sh [repository-root]`.606. Run `scripts/impact.sh [repository-root] [base-ref]`. Review deletions,61 ResourceSet input removals, Kustomization reference removals, namespace62 changes, source changes, and profile activation changes.637. Compare each changed deployment unit:64 - Kustomize: `scripts/diff-kustomize.sh <repo> <overlay-path> [base-ref]`;65 - umbrella Helm: `scripts/diff-helm-selection.sh <repo> <app> <component> <environment> [base-ref]`.66 An object appearing in a complete render is not proof that it changed.678. Show planned resources and pruning impact before destructive or externally68 mutating operations.699. Do not push, merge, run a pipeline, apply bootstrap, modify IAM, or mutate a70 cluster unless the user authorized it.7110. After merge, observe the local Flux graph and workload. Correct or revert72 Git when desired state is wrong.7374## Validation rules7576- Render every changed Kustomize root with `kubectl kustomize`.77- For umbrella Helm, lint and template every affected component/environment78 using global values first and the selected values file last.79- Inspect names, namespaces, labels, images, requests, and duplicate identities.80- Verify each Helm environment file enables exactly one subchart.81- Never render, decode, or print secret values into logs.82- A live dry-run is optional; local rendering remains mandatory.8384## Observe Flux8586Run against the target cluster, not an assumed hub:8788```bash89kubectl -n flux-system get fluxinstance,resourceset90kubectl -n flux-system get gitrepository,kustomization,helmrelease91kubectl -n flux-system describe kustomization <name>92```9394Expect every relevant object to report `Ready=True`. Additional members have95only `fleet-config` and, in the full application scope, `apps-config` sources; the primary also has96`cluster-config`. Read conditions and events before changing Git.9798## Report every result99100Include the target cluster, namespace, application, component and environment;101all created/modified/deleted files; validation results; proven changed and102pruned Kubernetes identities; external actions performed or still requiring103authorization; and the exact Git revert procedure.104105Use `assets/` only as starting points. Replace every `__TOKEN__`, inspect the106result, and adapt it before committing. Read107[references/templates.md](references/templates.md) first.