GitOps Export
K8Cost turns recommendations into production-ready manifest patches that you can commit directly to your GitOps repository. No manual YAML editing required.
What It Does
When you approve a recommendation, K8Cost generates a patch that modifies the relevant Kubernetes resource. You choose the format that matches your deployment workflow, download the patch, and apply it through your existing CI/CD pipeline.
Supported Formats
| Format | Use Case |
|---|---|
| YAML | Direct kubectl apply or plain manifest repositories |
| Helm Values | Override values files for Helm chart deployments |
| Kustomize | Overlay patches for Kustomize-based workflows |
| JSON Patch | RFC 6902 patches for programmatic application |
| Strategic Merge Patch | Kubernetes-native merge patches for partial updates |
Key Capabilities
- Single or batch export -- Generate patches for one recommendation or select multiple and export them together
- Format auto-detection -- K8Cost suggests the right format based on your cluster's deployment metadata (Helm releases, Kustomize annotations)
- Preview before download -- See the exact patch content in the dashboard before exporting
- GitHub PR integration -- Create a pull request with the patch applied to the correct file in your repository
- GitLab MR integration -- Same workflow for GitLab-hosted repositories
- Download as file -- Export patches as individual files or a bundled archive
How It Works
K8Cost reads the current resource spec from the recommendation (e.g., a Deployment with resources.requests.cpu: 2000m) and generates a patch that modifies only the relevant fields (e.g., setting resources.requests.cpu: 500m). The patch preserves all other fields and metadata.
For Helm-based deployments, K8Cost generates a values override file rather than patching the rendered manifest, so the change flows through your Helm chart's templating logic.
Example: Kustomize Overlay
# kustomize-patch.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-server
namespace: production
spec:
template:
spec:
containers:
- name: api-server
resources:
requests:
cpu: 500m
memory: 512Mi
limits:
cpu: "1"
memory: 1Gi
Sign up free to generate GitOps patches from your recommendations.