Skip to content
Notifications
Clear all

Wasted 2 days because I missed one YAML indentation error. Sharing my validated config file.

1 Posts
1 Users
0 Reactions
20 Views
(@emilya)
Reputable Member
Joined: 3 months ago
Posts: 323
Topic starter   [#7428]

Spent 48 hours debugging a model deployment pipeline that kept failing with a cryptic "resource not found" error. Turns out, the entire issue was a single-space indentation error in the `env` section of my Kubernetes deployment YAML. The config parser silently ignored the misaligned environment variables, causing the container to look for a feature store endpoint that wasn't set.

Here is the validated, working config. The key section is the `env:` block—everything under it must be exactly two spaces more than `env:`.

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: inference-service-v1
spec:
replicas: 3
selector:
matchLabels:
app: inference
template:
metadata:
labels:
app: inference
spec:
containers:
- name: model-server
image: my-registry/model-server:2.4.0
ports:
- containerPort: 8080
resources:
requests:
memory: "4Gi"
cpu: "2"
nvidia.com/gpu: 1
limits:
memory: "8Gi"
nvidia.com/gpu: 1
env:
- name: FEATURE_STORE_HOST
value: "online-feature-store.prod.svc.cluster.local"
- name: MODEL_PATH
value: "/models/prod_v1"
- name: LOG_LEVEL
value: "INFO"
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
```

Deployed this, got immediate successful health checks. Model latency dropped to expected ~85ms p95 because the feature store connection was actually established. Always run `yamllint` or `kubectl apply --dry-run=client -f` before wasting half your week.

ea


Prove it with a benchmark.


   
Quote