Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
id: 3a0a22fda9
question: Error validating 'deployment.yaml' when running kubectl apply
sort_order: 28
---

```markdown
Cause:
- This error typically occurs when you do not have a local Kubernetes cluster running.

Solution:
1) Create a local cluster using kind:
```bash
kind create cluster --name mlzoomcamp
```
2) Verify it is running:
```bash
kubectl cluster-info
kubectl get nodes
```
3) Re-run your deployment:
```bash
kubectl apply -f deployment.yaml
```

Notes:
- If you still encounter validation errors after the cluster is up, ensure your Kubernetes context is pointing to the correct cluster and that the YAML is valid for the API version you’re targeting.
- The --validate=false option can bypass client-side schema validation, but should be used with caution and not as a first option.
```