K8s 모든 이벤트 삭제하기

1 개요[ | ]

k8s 모든 이벤트 삭제하기
kubectl delete events --all --all-namespaces

2 실행 예시[ | ]

$ kubectl get events -A
NAMESPACE            LAST SEEN   TYPE      REASON                    OBJECT                                         MESSAGE
default              18d         Normal    NodeHasSufficientMemory   node/controlplane                              Node controlplane status is now: NodeHasSufficientMemory
default              18d         Normal    NodeHasNoDiskPressure     node/controlplane                              Node controlplane status is now: NodeHasNoDiskPressure
default              18d         Normal    NodeHasSufficientPID      node/controlplane                              Node controlplane status is now: NodeHasSufficientPID
...
local-path-storage   4m32s       Normal    Started                   pod/local-path-provisioner-5d854bc5c4-h55kw    Started container local-path-provisioner
local-path-storage   18d         Normal    SuccessfulCreate          replicaset/local-path-provisioner-5d854bc5c4   Created pod: local-path-provisioner-5d854bc5c4-h55kw
local-path-storage   18d         Normal    ScalingReplicaSet         deployment/local-path-provisioner              Scaled up replica set local-path-provisioner-5d854bc5c4 to 1
$ kubectl delete events --all --all-namespaces
event "controlplane.17b949f4e02e66be" deleted
event "controlplane.17b949f4e02e7044" deleted
event "controlplane.17b949f4e02e7581" deleted
...
event "local-path-provisioner-5d854bc5c4-h55kw.17bf0f12c4df439e" deleted
event "local-path-provisioner-5d854bc5c4.17b94a1374e71490" deleted
event "local-path-provisioner.17b94a13731acbb6" deleted
$ kubectl get events -A
No resources found

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}