Ankra makes it easy to manage clusters using GitOps. Define your cluster’s configuration, manifests, and add-ons in YAML files, store them in Git, and let Ankra handle the automation.
What is GitOps?
GitOps is a way to manage your Kubernetes infrastructure using Git as the single source of truth. With Ankra:- Store configuration in Git - Your cluster definitions, manifests, and add-ons live in your repository
- Automatic sync - Ankra detects changes and applies them to your clusters
- Version control - Track every change, roll back when needed, review via pull requests
- Team collaboration - Multiple team members can update configurations safely
How It Works
Ankra uses include paths to let you split your configuration into multiple files or folders. This keeps your setup modular, maintainable, and easy to scale.Why Use Include Paths?
CI/CD Integration
Keep manifests and add-ons in separate files or folders for easy automation in your CI/CD pipelines. Update only what you need, and trigger deployments automatically.
Modularity & Reuse
Organize resources by team, environment, or feature. Reuse the same manifests or add-ons across different stacks or clusters.
Team Collaboration
Let different teams own and update their own YAML files without merge conflicts. Everyone works from the same Git repository.
Scalability
Easily add new resources or stacks by dropping new YAML files into the right folder - no need to edit a giant config file.
Repository Structure
Organize your Git repository with separate folders for manifests and add-ons:AGENTS.md sibling files hold per-manifest and per-add-on operational learnings for your team and Ankra’s AI - see Teach Your Agents with AGENTS.md.
Cluster Definition Example
Yourimport-cluster.yaml references files using include paths:
manifests/ and addons/ folders. You can also include individual files for more control:
Single-File Cluster Definition
For small or self-contained setups you can skip include paths and define everything inline in one file. Manifest and values content is embedded as base64:parents to control deployment order - a resource only deploys after its parents succeed. Prefer include paths once a cluster definition grows beyond a couple of resources.
Every field of this file - stacks, manifests, add-ons, applications, parents, and encrypted paths - is documented in the ImportCluster YAML Schema.
Data Sources in the Cluster Document
The cluster’s metrics and log data sources live in the same file, asspec.prometheus_metrics and spec.log_source. Both are read back on every sync, so writing either block in Git connects the source and updates it - you do not have to configure it in the platform first:
username, password, token or auth_scheme inside a source block is refused, and the credential is referenced by credential_name instead. Deleting a block does not disconnect the source - Git can create and update one, only the platform can disconnect it. See spec.prometheus_metrics and spec.log_source.
How Ankra Syncs Your Cluster
- You update or add YAML files in your Git repository
- Ankra detects the change and automatically syncs your cluster
- All included manifests and add-ons are applied in the order you specify
What Ankra Writes Back to Git
Sync is two-way. Changes you commit are applied to the cluster, and changes made through the portal, the CLI, the API or Ankra AI are written back to the cluster’s directory in the repository, so Git stays the record. A platform write lands as a commit authored byankra-platform[bot] (a change made in the portal, CLI or API) or by Ankra Reconciler with the subject Sync cluster state from Ankra (the reconciler exporting stored state).
The ownership manifest: .ankra-owned.json
Every cluster directory carries a file named .ankra-owned.json. Ankra rewrites it on each platform write. It is a record of what that write rendered - not an inventory of the directory, and not a claim on it:
pathslists the files the last write rendered. It bounds deletion: when a stack or add-on is removed, only files listed here are pruned. A file Ankra never rendered is never deleted, only reported.contentsmaps each rendered file to a digest of the bytes Ankra itself last wrote there. It bounds overwriting: before writing a file, Ankra compares what is in Git with that digest. If they differ, the file was edited since, and Ankra keeps the Git version instead of replacing it.
Hand-maintaining a file
To keep a value Ankra would otherwise render - an image tag pinned above a chart’sappVersion for a CVE fix, an updateStrategy, topologySpreadConstraints - edit the file in Git and merge it. Ankra syncs the change into the cluster, and from then on the file’s bytes in Git no longer match the digest Ankra recorded, so no platform write replaces them. This holds for every write path: portal, CLI, API, Ankra AI and the reconciler’s own export.
Three limits apply today:
- SOPS-encrypted files are not covered. Their committed bytes are ciphertext that cannot be reproduced from the render, so Ankra keys them on the embedded content fingerprint instead, and re-encrypts the file whenever its stored values change. A hand edit to an encrypted file sealed under the cluster’s
.sops.yamlis imported like any other Git change and then re-sealed by Ankra’s next write - the values survive, the ciphertext does not, so expect one re-seal commit after rotating a sealed Secret by hand (see Rotating by API and SOPS). .sops.yamlin the cluster directory has its own rule. Ankra rewrites the creation rules it generates there on every export, but it no longer replaces the file: rules you add by hand are kept, and kept above Ankra’s own. See Merging the SOPS configuration file below.- Preservation is silent. Ankra logs
Preserving git content the platform did not writeon its side, but the sync status still reads in sync and no portal, CLI or API surface lists the preserved paths yet. While a file is preserved, a change made to it in Ankra does not reach Git - make the change in Git instead, which also brings Ankra’s copy back in line.
Merging the SOPS configuration file
The.sops.yaml in a cluster directory has two authors, so it is not covered by the digest boundary above: it is merged on every platform write instead of replaced, and the file it writes opens with a header saying so.
- Ankra owns only the rules it generates: a rule carrying a
path_regexAnkra generates, anagekey, and at most anencrypted_regex- and nothing else. Ankra rewrites those on every sync and lists them last in the file. While the cluster declaresencrypted_paths, each generated rule carries anencrypted_regexbuilt from the union of every declaration across the cluster’s stacks, rebuilt on every sync as the declarations change, so asops -ethat applies the rule seals only declared secret keys and leaves every other key readable. It is one union per cluster, so it is broader per file than what Ankra itself seals per resource: a key declared secret for any resource in the cluster is sealed in every matching file. - Every other rule is yours. It is preserved verbatim and kept above Ankra’s own. SOPS applies the first matching creation rule, so a rule of yours takes precedence over Ankra’s - including a deliberately keyless first rule, which is the supported way to keep a path out of encryption and make an external
sops -eon it fail loudly rather than seal a file that must stay plaintext. Write itspath_regexrelative to the cluster directory, not the repository root:sopsmatches a rule against the file’s path relative to the directory holding the.sops.yamlit is using, so for the cluster’s file the path being tested isstacks/<stack>/add-ons/<add-on>/values.yaml. A rule written from the repository root never matches, and a refusal caused by nothing matching is an accident, not protection - see Checking that a keyless rule applies. - To override one of Ankra’s rules, write a rule that is not shaped like Ankra’s: keyless, using
key_groups, carrying a field other thanpath_regex,ageandencrypted_regex, or on a differentpath_regex. A rule that is apath_regexAnkra generates plus anagekey, with or without anencrypted_regex, cannot be told apart from Ankra’s own output and is replaced whatever itsageorencrypted_regexvalues are - that is what lets a key rotation or a changed declaration reach the file, and it happens silently. To keep your own recipients or your ownencrypted_regexon a path Ankra covers, name the recipients withkey_groups. The warning below spells it out. - Other top-level keys are yours too.
stores,kms,shamir_thresholdand anything else in the file are carried through untouched. - Ankra does not read these rules. Its own encryption is driven per resource by that resource’s
encrypted_pathsdeclaration, compiled to a SOPSencrypted_regexwhen the resource is sealed (see SOPS). The file exists for external tooling that runssopsagainst the repository.
.sops.yaml Ankra cannot parse is left exactly as it is, rather than rewritten.
Checking that a keyless rule applies
sops looks for .sops.yaml by walking up from the current directory, not from the file it is given, and matches each path_regex against the file’s path relative to the directory holding that .sops.yaml. Test a rule from the repository root with an explicit --config, writing to stdout (never -i):
Pair the check with a positive control in the same run: a neighbouring file that only a rule with recipients covers must encrypt, or the refusal proves nothing about your rule. Ankra’s generated rules are written relative to the cluster directory (
.*values\.yaml$ and .*manifests/.*\.yaml$), so on a cluster synced since that change they match and can serve as the control: a values file only they cover must encrypt. A .sops.yaml still carrying the older repo-rooted spellings (<cluster-directory>/.*values\.yaml$) predates the change - those rules match nothing, Ankra’s next write to the cluster replaces them, and until then a control needs a keyed rule of your own, written relative to the cluster directory like the keyless one.
Monitoring Sync Status
Track the status of your GitOps syncs in the cluster settings.Sync Status Banner
Navigate to your cluster → Settings → GitOps to see the current sync status:Sync Progress
During a sync, you’ll see the progress through these phases:- Fetching - Pulling latest changes from Git
- Validating - Checking YAML syntax and configuration
- Applying - Deploying changes to the cluster
- Completed - Sync finished successfully
Manual Sync
Click Sync Now to trigger an immediate sync from your Git repository. Use this when:- You want to apply changes without waiting for automatic detection
- Webhook delivery failed
- You need to force a refresh
Sync History
View a complete history of all GitOps syncs for your cluster.Accessing Sync History
- Go to your cluster → Settings → GitOps
- Scroll down to the Sync History table
History Table Features
The sync history table shows:
Table Features:
- Pagination: Navigate through history (10 entries per page)
- Sorting: Click column headers to sort by any field
- Commit Links: Click the SHA to view the commit in GitHub
Sync Metadata
Each sync entry includes detailed metadata:- Last Commit SHA: The exact commit that was synced
- Sync Source:
webhook(automatic) ormanual - Timestamp: When the sync occurred
- Retry Count: Number of retry attempts (if any)
- IAC Files Link: Direct link to view the configuration files in your repository
Handling Sync Errors
When a sync fails, Ankra provides detailed error information to help you fix issues quickly.Error Display
Failed syncs show:- Validation Errors: Issues with YAML syntax or configuration
- Field-Level Guidance: Specific fields that need attention
- Missing Fields: Required fields that weren’t provided
- Typo Detection: Suggestions for misspelled field names
Common Error Types
Validation Errors
Validation Errors
YAML syntax issues or invalid configuration values.Solution: Check the error details for the specific field and fix the YAML in your repository.
Missing Required Fields
Missing Required Fields
Required configuration fields weren’t provided.Solution: The error shows which fields are missing with examples of expected values.
Resource Conflicts
Resource Conflicts
A resource already exists or conflicts with another definition.Solution: Check for duplicate resource names or conflicting configurations.
Retrying Failed Syncs
- Fix the issues in your Git repository
- Commit and push the changes
- Click Sync Now or wait for automatic detection
- Monitor the new sync in the history table
Best Practices
Troubleshooting
If Ankra isn’t syncing as expected:Global Helm Registries
Ankra comes with a curated index of preloaded Helm charts that are ready to use out of the box. These registries power the add-on catalog in the Ankra platform.Community Contributions
Want to add a Helm chart that would benefit the entire Ankra community? Submit a pull request to the ankra-global-resources repository. Your contribution will be available to all Ankra users.
- Helm Registries - Preloaded chart repositories that appear in the Ankra add-on index
- Global Resources - Platform-wide resource definitions
Contributing a Helm Registry
- Fork the ankra-global-resources repository
- Add your Helm registry definition to the
helm_registries/folder - Submit a pull request with a description of the charts and their use cases
- Once merged, your charts will be available to all Ankra users
When contributing, ensure the Helm charts are well-maintained, secure, and provide value to the broader Kubernetes community.
Related
- Stacks - Learn about organizing resources into stacks
- Add-ons - Install Helm charts as add-ons
- Manifests - Deploy raw Kubernetes manifests
Still have questions? Join our Slack community and we’ll help out.