kubectl get role -A NAMESPACE NAME CREATED AT kube-public kubeadm:bootstrap-signer-clusterinfo 2022-02-24T13:55:25Z kube-public system:controller:bootstrap-signer 2022-02-24T13:55:23Z kube-system extension-apiserver-authentication-reader 2022-02-24T13:55:23Z kube-system kube-proxy 2022-02-24T13:55:25Z kube-system kubeadm:kubelet-config-1.21 2022-02-24T13:55:24Z kube-system kubeadm:nodes-kubeadm-config 2022-02-24T13:55:24Z kube-system system::leader-locking-kube-controller-manager 2022-02-24T13:55:23Z kube-system system::leader-locking-kube-scheduler 2022-02-24T13:55:23Z kube-system system:controller:bootstrap-signer 2022-02-24T13:55:23Z kube-system system:controller:cloud-provider 2022-02-24T13:55:23Z kube-system system:controller:token-cleaner 2022-02-24T13:55:23Z kube-system system:persistent-volume-provisioner 2022-02-24T13:55:27Z kubernetes-dashboard kubernetes-dashboard 2022-03-02T16:10:23Z
查看所有的serviceaccount
1 2
kubectl get serviceaccount -A
4.删除pod
1 2
kubectl delete pod chart-1645714995-kubernetes-dashboard-6b6475d8db-kp7vc -n kube-system
删除pod后如果又重启,需要先删除deployment,副本中定义了pod的数量
1 2 3 4 5 6 7
kubectl get deployment -A NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE kube-system chart-1645714995-kubernetes-dashboard 1/1 1 1 4d1h kube-system coredns 1/1 1 1 4d2h