Claude Code writes, Ankra generates and runs, a person promotes
What you need
- Claude Code and the Ankra CLI, logged in with
ankra login. - An empty GitHub repository, and a GitHub credential in your organisation that can reach it.
- Two clusters in the same organisation: one for development and one for production. They can be clusters Ankra builds for you (Ankra Managed), clusters your cloud runs (Managed Kubernetes), or clusters you import.
- A cluster your organisation runs CI on, for Ankra Pipelines. The development cluster is a good choice.
Build it and hand it over
1
Give Claude Code the Ankra skills
Install Ankra’s Agent Skills into Claude Code. They teach it to use the Ankra CLI and the Ankra workflow instead of writing raw Kubernetes and CI files by hand:Optionally add the Ankra MCP server, so Claude Code can read clusters, pipeline runs and logs directly.
2
Build the codebase
Work with Claude Code the way you normally would. Two things make the hand-over clean: write down the standards it must follow, and tell it which files are Ankra’s job.For a longer build, split it into planned stages as described in Prompt to Production.
3
Hand the repository to Ankra
From the checkout, with the development cluster:Or ask Claude Code to do it with the Ship from your checkout explains each step it waits on, and the five minutes it gives the address to answer before it ends with
/ankra-ship-service command the skills installed. ship registers the application and waits for Ankra’s analysis and setup pull request. On a new repository it stops there with the state waiting_for_setup_pull_request (exit code 9), because nothing builds the tracked branch until a person merges that pull request. Review and merge it, approve the pipeline (see the note under What Ankra generates for you), and run the same command again. ship continues from where it stopped: it waits for the first build, deploys, waits until the address answers over HTTPS, and prints:Deployed and healthy, not answering yet instead of Live:. Re-running it is always safe.What Ankra generates for you
When the repository is registered, Ankra’s AI reads it, detects the language and framework, and works out what it needs to run. It writes the result as one setup pull request in your repository, so every generated file is something you can read and review.
From then on, Ankra does these on every change without being asked:
- Builds and scans. Each push is built rootless in your cluster, scanned with Semgrep over the source, Checkov over the manifests and Trivy over the image, and judged against your organisation’s security gate before anything is published.
- Publishes an immutable tag. A passing build on the tracked branch is published as
sha-<7>. No tag is ever overwritten, so the tag you tested is byte-for-byte the tag you promote. - Fixes its own setup pull request. If the setup pull request fails its checks, usually on a vulnerable dependency the repository already had, Ankra AI commits a fix to the same pull request and explains it in a status comment. See When the setup pull request does not pass its checks.
- Investigates failed builds. A failed build on the tracked branch dispatches an agent that proposes a fix, or opens a fix pull request if you allow it. See When a build on your branch fails.
- Reviews pull requests. Ankra AI reviews every pull request against your organisation’s skills, and can post a live preview URL for each one. See Application AI settings and Pull request preview environments.
- Gives it an address. The app gets a hostname under the cluster’s domain with a TLS certificate, or your own domain. See Domains and DNS.
The generated pipeline needs a person to approve it once. Creating the application in the portal approves it in your name. An application added from the CLI, an API token or Claude Code leaves that approval to an administrator:
ankra pipeline get --application <name> --latest prints the exact approve command. This is deliberate: an agent can propose a pipeline, but only a person can authorise what runs in your cluster.Deploy to two clusters
One application deploys to as many environments as you give it. Each environment is a cluster and a namespace with its own deploy options, its own database and its own push-to-deploy switch.1
Development follows every merge
The first
ship already deployed to development. Push to deploy is on from registration, so every successful build of the tracked branch now rolls out there automatically. Give development its own namespace and address if you want them explicit:2
Set the secrets
Application secrets are stored in Ankra, never committed. Pipe them in so they never land in your shell history:These secrets belong to the application, and
apply seals them into every deployment of it, in development and production alike. The app only sees a key its manifests read: ankra application env-secrets list <application-id> shows a key no manifest reads with the role unreferenced. When no workload reads the generated Secret at all, apply says No workload in this deployment reads the <name> Secret, so nothing needed rolling. Have Claude Code read the key from the generated Secret in the manifests first. A value that must differ between the two, such as a test and a live payment key, belongs in each cluster’s own configuration instead: encrypt it with SOPS in that cluster’s Stack, as described in Encryption and SOPS. The generated database is already separate per environment. To reuse a database, registry or API the organisation already has, see Connect to a managed service.3
Production moves only when a person promotes
Deploy the exact tag development proved to production, as an environment named A new environment follows the application’s push to deploy switch, which is on, so turn it off for production straight away and leave development on:In the portal, choose production in the environment menu at the top of the application, open Settings → Deploys, and choose Turn off deploy on every push. Deploy on every push now reads Off for production. It prints what each environment runs and what stays different, asks before it deploys, and
production:ankra application environments <application-id> shows production as manual.Promotion moves the image tag only: never a rebuild. Once production has that first deployment, ankra application promote moves the tag development runs onto production and leaves production’s own deploy options as they are:--dry-run stops after showing it; --from and --to take the names, ids or roles that ankra application environments <application-id> lists. It refuses a production that still follows pushes, which is why the switch above comes first. You can also promote from the application’s Environments view, under Promote a version, or ask Claude Code with /ankra-promote, which promotes a verified tag without rebuilding it and stops for your confirmation.Who is responsible for what
Ankra automates a lot, so it matters to be explicit about what it does not do. The rule of thumb: Ankra generates and runs; you decide and own. Anything Ankra generates lands as a pull request or a file in your repository, and once you merge it, it is yours.
Two lines in that table are the ones to hold on to: Claude Code can do almost everything up to a production deploy, and production is a decision a person makes. In Agent mode, every write the AI proposes stops at a confirmation card, and the pipeline approval is never something an agent can grant itself.
For the platform-wide boundary, including what this means for your own audits and certifications, see Shared responsibility.
Security, CVEs and encryption
Security is not a stage you add at the end. Each cluster carries a security baseline, every Stack shows what its containers are exposed to, every CVE is ranked by whether it is actually being exploited, and every secret in Git is encrypted.Security in every Stack
The baseline. Clusters Ankra builds get theankra-security-baseline Stack profile at create time, unless your organisation opted out. On an imported or cloud-run cluster, install it with ankra security enable-baseline --cluster <cluster-id>. In the portal, Turn on scanning on the cluster’s Security page opens the organisation’s security coverage, where the fix that enables scanning installs the same baseline on every cluster that has no scanner. The baseline carries:
- Trivy Operator, which scans every running image for vulnerabilities. Its configuration audit and CIS benchmark are off by default, because they load the control plane; turn them on per cluster with the profile inputs.
- Pod Security Standards enforced by Kubernetes itself. The Ankra agent labels namespaces for Pod Security Admission, which is built into the API server, so no policy engine has to run. Start both clusters in Audit, fix what development reports, and switch production to Enforce once it is clean.
- A guard on the enforce label, so nobody can switch enforcement off with a namespace edit.
ankra-policy-engine profile, which runs Kyverno.
Security by Stack. Open Clusters → <your cluster> → Security. Under Where the issues are, issues are grouped by the Stack that deployed them, with the count Used by attackers and how many containers are scanned and have an SBOM. Open a Stack there to see its add-ons, pods and images, so “is the Postgres in this Stack exposed?” is a couple of clicks, or one command:
Dealing with CVEs
CVEs arrive at two points, and Ankra handles each one differently:- Before an image ships. The pipeline scans every build with Semgrep, Checkov and Trivy, and your organisation’s gate refuses to publish anything above its threshold.
ankra pipeline findings <run-id> --application <name>lists what stopped a build, worst first. - After an image is running. A CVE published next month lands on the image already in production. Trivy Operator finds it, and the Security Center cross-references it with the CISA Known Exploited Vulnerabilities (KEV) catalogue and FIRST EPSS scores, so the top of the list is what attackers are actually using.
1
Look at what is exploited first
2
Fix it through the same pipeline
Hand the fix to Claude Code. It is a normal change: a pull request, scanned again, deployed to development, then promoted.Fix with Ankra on a finding in the application’s Security view starts the same work from the portal.
3
Or decide, on the record
If there is no fix yet, or the vulnerable code path is never reached, record a decision instead of ignoring the finding. Acknowledged keeps it actionable and alerting. Accepted risk removes it from actionable counts and alerts, and needs a reason, a review date at most a year out and the
security.manage permission. Every disposition is audited. An image-scoped acceptance follows the image digest, so the next rebuild brings the finding back for a fresh decision. See Acknowledge vs accept risk.security_findings alerts (kev and new_kev_cves) to the team that owns the app. See Alerts.
The security email
Each cluster can email a security report daily, weekly or monthly, for example to your security team or an auditor. Recipients do not need an Ankra account. The report shows actionable findings by severity and how they moved since the last report, puts known-exploited CVEs in their own banner, and lists the package upgrades that clear them under Fix these first. Accepted risk is left out, so the report only shows what still needs work.send emails the current report right away, so you can check delivery before the first scheduled one. The portal has no page for the schedule: set it with these commands. The report needs Trivy Operator, which the security baseline installs. See Security reports.
Encryption and SOPS
Everything about a cluster lives in Git, and Git must never see a plaintext secret. Ankra encrypts values with SOPS and an AGE key that belongs to your organisation:1
Initialise encryption once
Open Infrastructure → Variables and secrets and, under Encryption key, choose Make the key. Ankra generates the AGE key pair: the public key seals values, and Ankra keeps the private key in its secret store. A cluster’s agent is given the key when a deploy reaches a sealed value, and on a cluster whose add-ons deploy through ArgoCD it is also stored in the cluster as the Secret
ankra-sops-age-key. Decryption on each cluster is automatic, so there is nothing to configure per cluster.2
Mark which keys are sealed
List a manifest’s or add-on’s sensitive keys from the CLI, where a Ankra seals the listed keys on every push to Git, so the repository only ever holds
glob: pattern also covers keys you add later. The portal’s Stack editor has no field for them:ENC[AES256_GCM,...] for them. A push that cannot seal a listed key is refused, not committed. The agent decrypts inside the cluster at deploy time.3
Check Git, not the editor
Sealing happens at the push, so the value Ankra shows you is not proof. To confirm a value is encrypted, open the file in the Git repository.
Add one line to Claude Code’s standing instructions so it never breaks the rule: “Never commit a plaintext secret. Seal sensitive keys with
ankra cluster encrypt.” The portal has no button to rotate the organisation key; see Key rotation.
Day 2
The app is live in two places. Most of day 2 is the same loop you used to build it, with Ankra doing the watching.Changing the app
Keep working in Claude Code. Every pull request is built, scanned and reviewed by Ankra AI, and can get its own throwaway preview URL. Previews deploy to the organisation’s staging cluster, which an admin sets under Ankra AI → AI workspaces; the development cluster works well for it, so no third cluster is needed. See Pull request preview environments. When it merges, development redeploys on its own:Promoting and rolling back
Promote the same way every time: the tag that passed in development, to production, by a person, from Promote a version on the application’s Environments view or withankra application promote <application-id> --from development --to production (CLI v0.71.0 or later), which asks before it deploys. To roll back, deploy the previous tag:
ankra application deployments lists the previous tags, and the application’s History view shows what changed, where and who did it. Configuration that differs between environments stays in each environment’s deploy options and cluster configuration, so a promotion never carries development settings into production.
When something breaks
Ask Claude Code to investigate with/ankra-triage. It reads logs, events, metrics and Ankra’s operation history through the CLI, read-only until it has a diagnosis:
Keeping both clusters healthy
- Alerts. Route pipeline failures, blocked images and cluster events to the channel that owns the app. See Notification routing.
- Backups. Protect every Stack that holds data, starting with the generated database, so production can be restored. See Backups and restore points.
- Security. New CVEs land on images that are already running. Work the known-exploited ones first, read the weekly security email, and run
/ankra-hardennow and then for a ranked security pass over the organisation. See Dealing with CVEs. - Dependencies. Ask Claude Code to update them in a pull request. The pipeline scans the result before it can publish.
- Kubernetes upgrades. Upgrade development first, run the app there, then upgrade production. For clusters Ankra builds, see Upgrade Kubernetes. For cloud-run clusters, see Managed Kubernetes.
- Platform add-ons. Change versions in the GitOps repository, let development reconcile first, and promote the same change to production. See GitOps.
Let Ankra fix and maintain it
Claude Code works in your repository while you are at the keyboard. Ankra’s AI agents work in the platform when you are not: on a schedule, when an alert fires, or when a ticket lands on the board. You decide how far each one may go.What already runs on its own
Without any setup, Ankra AI fixes a failing setup pull request, investigates every failed build on the tracked branch, and reviews every pull request. These are covered in What Ankra generates for you. Everything below is something you switch on.The DevSecOps agent: CVEs to pull requests
The DevSecOps agent, one of Ankra’s default agents, turns a cluster’s security report into fixes:- It reads the critical and high findings, known-exploited CVEs first, production clusters before the rest.
- It maps each vulnerable image to the application or add-on that deployed it.
- For an application, it bumps the base image or package in the repository and opens one pull request listing every CVE it clears. For an add-on, it proposes the chart version that ships the fix, with the current version as the rollback.
- Once the fix is merged and rebuilt, it re-reads the report and quotes the before-and-after counts.
Auto-remediation: alerts that fix themselves
Under Ankra AI → Autonomy and approvals, Fixing alerts automatically hands firing alerts to a remediation agent. It is off until an admin turns it on. Choose:- The level. Only look finds the cause and reports it. Ask first sends every fix to Slack for a person to approve or deny, and is the default. Fix small things on its own runs low-risk fixes that can be undone and asks first for everything else.
- The scope. Clusters Ankra AI may fix and Clusters Ankra AI leaves alone. Start with the development cluster.
- Per-action rules. For example, set
restart_deploymentto Run on its own,delete_podto Ask on Slack first, and anything else to Never run. - The limits. Fixes in one incident caps the actions, and Wait before the same alert is handled again sets the cooldown.
Watch what agents do
Every dispatch is recorded as a run with a full transcript. Ankra AI → Activity lists the runs in the portal, and the CLI reads and stops them:Keep a hand on the switch
Two stops apply to the whole organisation at once.ankra ai autonomy pause stops every autonomous action, and the AI keeps diagnosing but changes nothing without approval. ankra ai autonomy stop-all is the emergency stop for an incident. resume and start-all undo them. Whatever the settings, the lines from Who is responsible for what hold: an agent cannot approve its own pipeline or accept a risk on your behalf, and promoting to production stays a decision you keep for people: leave it out of every agent’s goals and keep agents that can reach production to proposing.
Verify
sha- tag in development and production after a promotion, and the production pods are running. Then open production in a browser and walk one real journey, such as signing up and signing in. A green deployment is not a working app; the journey is the check.
Next steps
Prompt to Production
Plan, storyboard, build and verify a larger app with agents, one stage per session.
Applications
How Ankra analyses a repository and what the setup pull request contains.
Ankra Pipelines
Every stage the generated pipeline runs, and how the gate decides what may publish.
Agent Skills
Every skill and slash command Claude Code gets from Ankra.