I used conda and flask in k8s, but there were no logs in the logs pod

101 views Asked by At

I used conda and flask in k8s, but ‘kubectl logs pod’does not have any logs.

  1. activate conda env:SHELL ["conda","run","-n","env_name","bin/bash","-c"]
  2. run flask(seldon) application: CMD exec seldon-core-microservice Model --service-type MODEL --persistence 0
  3. "docker run -ti " local container can display logs
  4. "kubectl logs " dones not have any logs

I set log config in .py:

logging.basicConfig(level=logging.INFO)

logger = logging.get Logger(__name__)

And try to print some logs by:

logging.info("hello world")

Debug in the local container can see logs, but pod does not have logs. Other pods created in the same way, as long as Conda is not used, can see logs Any advices? Thanks.

0

There are 0 answers