Ankra CLI
Cursor-Regel für Projekte mit der Ankra-CLI — sorgt für korrekte Befehls- und Konfigurationssyntax.
Cursor-Regel für Projekte mit der Ankra-CLI — sorgt für korrekte Befehls- und Konfigurationssyntax.
Original-Beschreibung der Autoren: Ankra CLI rules and best practices for managing Kubernetes clusters via the Ankra platform
Die Regel
---
description: "Ankra CLI rules and best practices for managing Kubernetes clusters via the Ankra platform"
globs: **/*.sh, **/*.yaml, **/*.yml, Makefile, **/Makefile, **/*.md
alwaysApply: false
---
# Ankra CLI Best Practices
Ankra is a Kubernetes cluster management platform. Its CLI (`ankra`) lets you manage organisations, clusters, add-ons, stacks, Helm releases, credentials, and tokens from the terminal.
## Authentication & Configuration
- Authenticate first: `ankra login`
- Default config lives at `~/.ankra.yaml`; override with `--config <path>`
- Override the API base URL with `--base-url` or `ANKRA_BASE_URL`
- Supply an API token via `--token` or `ANKRA_API_TOKEN` (prefer env var in CI)
- Logout cleanly: `ankra logout`
```yaml
# ~/.ankra.yaml example
base_url: https://api.ankra.io
token: ${ANKRA_API_TOKEN}
Organisation Management
ankra org list # List accessible organisations
ankra org switch <org-name> # Switch active organisation
ankra org create <name> # Create a new organisation
ankra org invite <email> # Invite a user to the current org
ankra org members # List members of the current org
Cluster Lifecycle
ankra cluster list # List all clusters in the org
ankra cluster select <name> # Set the active cluster context
ankra cluster info # Show details about the active cluster
ankra cluster provision # Provision a new cluster
ankra cluster deprovision # Deprovision (destroy) the active cluster
ankra cluster reconcile # Reconcile cluster to desired state
ankra delete cluster <name> # Delete a named cluster
- Always run
ankra cluster infobefore destructive operations - Use
ankra cluster reconcileafter config changes before assuming state is correct
Add-ons
ankra cluster addons list # List installed add-ons
ankra cluster addons available # List available (installable) add-ons
ankra cluster addons settings <addon> # Show current settings for an add-on
ankra cluster addons update <addon> # Update add-on configuration
ankra cluster addons uninstall <addon> # Uninstall an add-on
Stacks (Application Stacks)
ankra cluster stacks list # List stacks in the cluster
ankra cluster stacks create <name> # Create a new stack
ankra cluster stacks delete <name> # Delete a stack
ankra cluster stacks rename <old> <new> # Rename a stack
ankra cluster stacks clone <src> <dst> # Clone a stack
ankra cluster stacks history <name> # View stack change history
- Prefer
cloneovercreatewhen replicating an existing working stack - Check
historybefore rolling back to understand what changed
Manifests & Operations
ankra cluster manifests list # List deployed manifests
ankra cluster operations list # List in-progress or recent operations
ankra cluster operations cancel <id> # Cancel a running operation
Cluster Agent
ankra cluster agent status # Check agent health
ankra cluster agent token # Retrieve agent bootstrap token
ankra cluster agent upgrade # Upgrade the in-cluster agent
- Run
agent statusif cluster commands seem unresponsive - Rotate the agent token periodically for security
Helm
ankra cluster helm releases # List Helm releases in the cluster
ankra cluster helm uninstall <release> # Uninstall a Helm release
ankra helm registries # List configured Helm registries
ankra helm credentials # List Helm registry credentials
Hetzner Cloud Clusters
ankra cluster hetzner create # Create a Hetzner-backed cluster
ankra cluster hetzner scale # Scale the cluster node count
ankra cluster hetzner upgrade # Upgrade Kubernetes version
ankra cluster hetzner workers # Manage worker node groups
ankra cluster hetzner node-group # Node group management
Charts
ankra charts list # List available charts
ankra charts search <term> # Search charts
ankra charts info <chart> # Detailed chart information
Credentials
ankra credentials list # List stored credentials
ankra credentials get <name> # Retrieve a credential
ankra credentials validate <name> # Validate a credential
ankra credentials delete <name> # Delete a credential
ankra credentials hetzner --name <n> --token <t> # Store Hetzner API token
ankra credentials ovh ... # Store OVH credentials
ankra credentials upcloud ... # Store UpCloud credentials
- Never commit credentials to source control; use
ANKRA_API_TOKENenv var - Validate credentials immediately after creation:
ankra credentials validate <name>
Tokens (API Tokens)
ankra tokens list # List API tokens
ankra tokens create --name <name> # Create a new API token
ankra tokens revoke <id> # Revoke a token (keeps record)
ankra tokens delete <id> # Permanently delete a token
AI Troubleshooting
ankra chat # Start AI-powered troubleshooting session
Use ankra chat when facing ambiguous errors — it provides contextual guidance.
Global Flags
| Flag | Env Var | Description |
|---|---|---|
--base-url <url> |
ANKRA_BASE_URL |
Override API base URL |
--token <token> |
ANKRA_API_TOKEN |
API authentication token |
--config <path> |
— | Path to config file (default ~/.ankra.yaml) |
Scripting & Automation Tips
- Export
ANKRA_API_TOKENin CI pipelines; never hard-code tok … (hier gekürzt — Kopieren/Download liefert die vollständige Regel)
## So nutzt du sie
Die Regel kopieren (Button oben) oder als Datei herunterladen und im Projekt unter `.cursor/rules/` ablegen — Cursor lädt sie beim nächsten Start automatisch. Ältere Cursor-Versionen lesen alternativ eine einzelne `.cursorrules`-Datei im Projektstamm; dort einfach den Regel-Text ohne den Kopfblock zwischen den `---`-Zeilen einfügen.
Der Regel-Text ist englisch — Cursor versteht ihn unabhängig von der Sprache, in der Sie mit dem Editor chatten.
## Im Detail
Diese Regel richtet sich an Nutzer der Ankra-CLI und hilft Cursor, projektspezifische Befehle und Konfigurationsmuster korrekt zu generieren, statt sie zu erraten. Sinnvoll nur, wenn das Projekt tatsächlich mit dieser CLI arbeitet — für alle anderen Setups ist die Regel schlicht irrelevant und sollte nicht eingebunden werden. Wie bei allen Regeln der CC0-Sammlung reicht es, die Datei nach .cursor/rules zu kopieren, damit Cursor sie automatisch bei Vorschlägen im Projekt berücksichtigt.
## Praxis-Tipp
Vor dem Einsatz die Regel-Datei kurz selbst lesen, um zu prüfen, ob die enthaltenen Ankra-CLI-Befehle noch zur aktuell installierten Version passen.
## Lizenz & Quelle
- **Lizenz:** CC0 1.0
- **Quelle:** [PatrickJS/awesome-cursorrules (GitHub)](https://github.com/PatrickJS/awesome-cursorrules)
Inhalt ansehen (ankra-cli.mdc)
Lade …
Erfahrungen & Kommentare.
Funktioniert der Regel bei Ihnen? Tipps, Stolperfallen, Varianten — teilen Sie es mit der Community.
Lade Kommentare …
Passt dazu.
AI Agent Specialist
Cursor-Regel, die den KI-Editor auf diszipliniertes, spezialisiertes Agenten-Verhalten trimmt.
Alpha Skills Quant Factor Research
Cursor-Regel für quantitative Faktor-Recherche im Trading/Finance-Bereich — leitet die KI zu methodisch sauberer Analyse an.
Android Jetpack Compose
Cursor-Regel für Android-Entwicklung mit Jetpack Compose — sorgt für idiomatischen, deklarativen Kotlin-UI-Code.
