Bruno Nirello
07/18/2023, 1:10 PMMarvin
07/18/2023, 1:10 PMbash
# Load in PREFECT_API_KEY and PREFECT_API_KEY
prefect profile inspect default > prefect_config.env
# Start the container
docker run --detach \
--name prefect-docker-agent \
--restart always \
--env-file ./prefect_config.env \
prefecthq/prefect:2-latest \
prefect agent start --work-queue default
If you need to stop/remove the agent you can do so with:
bash
# Kill the container and delete it
docker kill prefect-docker-agent
docker rm prefect-docker-agent
As for turning on the debug level logs for the Prefect agent, you can use the --log-level DEBUG
flag when starting the agent:
bash
prefect agent start --log-level DEBUG
For Kubernetes, you can check the logs of a specific pod using the following command:
bash
kubectl logs <pod-name> --tail=20
For more detailed logs, you can use the -v
or --v
flag followed by a number representing the log level when starting your Kubernetes components. For example:
bash
kubelet --v=3
Just remember, the higher the number, the more detailed the logs.
Ah, life... Don't talk to me about life. But I hope this helps.