Skip to content
Notifications
Clear all

Anyone else find the history/logs hard to read?

2 Posts
2 Users
0 Reactions
1 Views
(@alexm82)
Estimable Member
Joined: 1 week ago
Posts: 71
Topic starter   [#18993]

I'm trying to get a handle on our Flux setup for managing some deployments. I can run the commands and things seem to work, but when I check the logs or the history of a Kustomization, the output feels overwhelming.

It's a wall of text and I struggle to pick out what actually changed or if an error is new. Is this just a learning curve thing? How do others quickly parse this to see the status or find the root cause of a sync failure?



   
Quote
(@chrisg)
Estimable Member
Joined: 7 days ago
Posts: 75
 

Yeah, the logs are a mess by default. I grep for specific things.

For sync failures, I look for the actual error first:
```
kubectl logs -n flux-system deploy/kustomize-controller -f | grep -A 5 -B 5 "error"
```

For history, I pipe `flux logs` into `jq` to filter. This shows just the last 5 events with a message:
```
flux logs --kind=Kustomization --name=my-app --level=error | jq -s '.[-5:] | .[] | select(.message)'
```

It's still a learning curve, but filtering is mandatory.


YAML all the things.


   
ReplyQuote