# AGENTS.md > [!NOTE] > This file describes the constraints and conventions for the `k8s` directory, which contains deployments for the **haumdaucher.de** Kubernetes cluster. ## Project Overview This directory contains the Kubernetes manifests and Helm charts for a single-node Kubernetes cluster (Haumdaucher). * **Domain**: `*.haumdaucher.de` * **Orchestration**: Self-managed Kubernetes (single node). * **Ingress**: `ingress-nginx` * **SSL**: `cert-manager` (LetsEncrypt) ## Directory Structure * **Top-level folders**: Each folder corresponds to a Kubernetes **namespace**. * Example: `mailu/` contains resources for the `mailu` namespace. * **Documentation**: `README.md` is the **authoritative source** for deployment commands. Always check it before running commands. ## Code Style & Conventions * **Helm Version**: Helm 3 (`helm`) is used. * **Implementation Order**: Top-down. * **Naming**: Namespaces matches folder names. * **Formatting**: Standard YAML conventions. ## Security & Secrets > [!IMPORTANT] > **Git-Crypt is enforced.** > Do not touch encrypted files unless you have the key and know how to unlock them. **Encrypted File Patterns**: * `*.secret` * `*.secret.yaml` * `*.secret.values` * `*.secret.sh` ## Remote Access It is possible to execute commands on the remote Linux node for information retrieval or troubleshooting. * **Host**: `haumdaucher.de` * **User**: `moritz` (local user) * **Privileges**: Use `sudo` to gain root privileges. > [!CAUTION] > **SSH Identity Required**: The agent cannot enter an SSH passphrase. > If SSH commands fail with authentication errors, request the user to run `ssh-add` locally to load their identity. ### Command Execution You can execute commands remotely via SSH. This is useful for checking node-level resources (memory, disk, etc.) that `kubectl` might not expose directly. **Example: Check Memory Usage** ```bash ssh moritz@haumdaucher.de "free -h" ``` **Example: Check Disk Usage (with sudo)** ```bash ssh -t moritz@haumdaucher.de "sudo df -h" ``` *Note: The `-t` flag forces pseudo-terminal allocation, which is often required for `sudo` prompts.* ## Deployment Instructions **Always consult `README.md` first.** Deployments vary between Helm charts and raw manifests. ### Common Patterns * **Helm**: ```bash helm upgrade --install -n -f ``` * **Kubectl**: ```bash kubectl apply -f /.yaml ``` ### Post-Implementation Verification > [!IMPORTANT] > **Verification Workflow**: > After a new implementation or configuration change, always: > 1. Run `kubectl apply -f .yaml`. > 2. Run `kubectl rollout restart deployment -n ` if applying a ConfigMap/Secret that a deployment depends on. > 3. Wait for 30 seconds to allow pods to roll over. > 4. Check logs using `kubectl logs -n -l