我正在Kubectl中寻找一种方法,以显示节点就绪/未就绪状态的历史记录以及过渡时间的时间戳。
答案 0 :(得分:2)
在kubectl describe nodes
部分下的Conditions:
的输出中可以看到节点状态的历史记录(就绪或未就绪)和上次转换时间:
Name: master-node-cf430c398
...
Conditions:
...
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
Ready True Wed, 24 Jul 2019 16:14:06 +0000 Mon, 22 Jul 2019 20:17:19 +0000 KubeletReady kubelet is posting ready status. AppArmor enabled
...
Name: worker-node-b587b0f0d3
...
Conditions:
...
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
Ready True Wed, 24 Jul 2019 16:14:07 +0000 Mon, 22 Jul 2019 20:17:22 +0000 KubeletReady kubelet is posting ready status. AppArmor enabled
...