Closed izhangzhihao closed 3 years ago
Normal Scheduled 55s default-scheduler Successfully assigned aid-recomm-dev/fail to cn-shanghai.192.168.0.242
Normal Pulled 55s kubelet Container image "python:3.7-alpine3.12" already present on machine
Normal Created 55s kubelet Created container python
Normal Started 55s kubelet Started container python
Here are the events. There are no failed
events above.
Anyone run into this problem can try this to invoke an unhealthy event:
apiVersion: v1
kind: Pod
metadata:
name: healthy
spec:
restartPolicy: Never
containers:
- name: python
image: python:3.7-alpine3.12
args:
- /bin/sh
- -c
- touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
to reproduce:
the content of the yml is
So it will just fail, and after that, you can see
and the result is
And the
Status
of the Pod isFailed
, but no events comes fromkube-eventer
: