Crowdsec + PG on K8S: agent can’t connect lapi
Hi, once configured to use a PG instance (schema is correctly created), the LAPI pod is in Running state, but all the agents are stuck with such errors in logs:
9 Replies
Important Information
This post has been marked as resolved. If this is a mistake please press the red button below or type
/unresolve
© Created By WhyAydan for CrowdSec ❤️
Could you provide your values.yaml?
You can redact any information, I just need to see where you have configured the databases for both LAPI and agents.
sure:
When you changed the values did you delete the persistentVolume?
it might be the persisted data is old and it cant detect that anything has changed to generate new credentials
hum, ok let’s shred all the setup
so, installation shred, PV deleted, then fresh install. SE enrollement validated and…
… same problem
LAPI is running correctly but the agents can’t auth their watchers
It's a slightly different issue: by default, when registering a remote agent, it needs to be validated in LAPI.
It's either a manual operation (not a great experience in k8s) or the agent can send a secret token to LAPI to automatically validate itself.
It's done by default in the chart, but if you update
config.yaml.local
, you need to explicitely put the configuration:
(another solution is to use TLS certs for auth, but it's a bit more involved on your end)Indeed! Thanks, with this update and rotation of all agents, it’s running now. I’ll go on with recaptcha configuration
/resolve
Resolving Crowdsec + PG on K8S: agent can’t connect lapi
This has now been resolved. If you think this is a mistake please run
/unresolve