[摘要] kubernetes 可能会产生垃圾或者僵尸pod,在删除rc的时候,相应的pod没有被删除,手动删除pod后会自动重新创建,这时一般需要先删除掉相关联的resources,实际中还要具体情况具体分析. 在使用Helm部署gitlab的时候发现有垃圾的pod存在,一直删除不掉 # kubectl get pods -n kube-system NAME READY STATUS RESTARTS AGE gitlab-migrations.1-2km-4rwnm 1/1 Running
1. Create and run a Pod kubectl run my-nginx --image=nginx:alpine We can run kubectl get all to see what has been created: 2. Delete a Pod: kubectl delete pod my-nginx-65959bc4b9-dfvwh Then run: kubectl get pods I found a new pod get created. my-ngin