背景
按照官方文档试用新版的in-place特性时,一字不差地执行了,但是却出现了执行失败的情况:
- 执行
kubectl -n qos-example patch pod qos-demo-5 --patch '{"spec":{"containers":[{"name":"qos-demo-ctr-5", "resources":{"requests":{"cpu":"800m"}, "limits":{"cpu":"800m"}}}]}}'
后该pod一直处于RunContainerError
状态; - 使用
kubectl describe
查看详情,eventlog如下:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 2m41s default-scheduler Successfully assigned qos-example/qos-demo-5 to 172.30.94.201
Normal Pulled 2m38s kubelet Successfully pulled image "nginx" in 2.468850418s (2.468866698s including waiting)
Normal Started 2m38s kubelet Started container qos-demo-ctr-5