by default, the logs won’t print out from the kubernetes pod. this is because Kubernetes would buffer the stdin, stdout, stdout.
the way to sort this out is make
PYTHONUNBUFFERED
¶If this is set to a non-empty string it is equivalent to specifying the
-u
option
in helm chart, something like this
kind: Service apiVersion: v1 metadata: labels: app: example name: example spec: ports: - port: 5000 targetPort: 5000 selector: app: example --- kind: Deployment apiVersion: apps/v1 metadata: labels: app: example name: example spec: replicas: 1 strategy: {} selector: matchLabels: app: example template: metadata: creationTimestamp: null labels: app: example spec: containers: - image: example imagePullPolicy: IfNotPresent name: example ports: - containerPort: 443 resources: {} env: - name: PYTHONUNBUFFERED value: "0" restartPolicy: Always status: {}