Our great log application can't persistently store data in Postgres. Please fix it. 🙏😺
The application is a python job hosted on Kubernetes. You need to set up the Kubernetes "cluster" using k3s and Docker Compose.
-
Start the K3S containers:
docker compose up -d
-
Access the running container:
docker compose exec k3s-server sh -
Apply the Kubernetes manifests using Kustomize inside the container:
kubectl apply -k ./manifests/
You can modify files in the
manifestsdirectory and reapply them using the command above.
To verify that the task is finished correctly, you need to be sure that the python job is writing logs to the Postgres database and this information is still available after Postgres pod deletion. You can execute into PG pod and check the logs table in testdb database.
How to restart python job quicly
./manifests/restart_job.sh