How to forcefully delete a daemonset or a pod in kubernetes cluster
I have setup a kubernetes cluster which is working fine. I created deployment with type as daemonset which then created few pods and it worked fine. I made few changes so I deleted the daemonset using:
kubectl delete daemonset <name> --namespace=clustech
While few pods were getting deleted, few of the machine went offline and thus the pods running on them went on to say unknown status. I need to remove those pods or completely remove that previous daemonset but unable to do. I am using below commands to delete pods:
kubectl delete pod PODNAME --grace-period=0 --force
But this shows below error:
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
Error from server (NotFound): pods "deployment-6sj54" not found
How can I delete the pods.?
Re-run the second command with namespace parameter will do your job.
--grace-period=0 --force is the right command to delete such pods.
实际示例:
[root@compass-user-hd-master3]:~# kubectl delete daemonset logging-fluentd-fluentd-v1-0 -n kube-system
error: timed out waiting for the condition [root@compass-user-hd-master3]:~# kubectl delete pod logging-fluentd-fluentd-v1-0-xtqdv -n kube-system --grace-period=0 --force
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
pod "logging-fluentd-fluentd-v1-0-xtqdv" deleted
How to forcefully delete a daemonset or a pod in kubernetes cluster的更多相关文章
- Kubernetes组件-DaemonSet
⒈简介 Replicationcontroller和ReplicaSet都用于在Kubermetes集群上部署运行特定数量的pod.但是,当某些情况下我们希望在集群中的每个节点上运行同一个指定的pod ...
- DaemonSet和StatefulSet
DaemonSet 的使用 通过该控制器的名称我们可以看出它的用法:Daemon,就是用来部署守护进程的,DaemonSet用于在每个Kubernetes节点中将守护进程的副本作为后台进程运行,说白了 ...
- Kubernetes学习笔记(二):部署托管的Pod -- 存活探针、ReplicationController、ReplicaSet、DaemonSet、Job、CronJob
存活探针 Kubernetes可以通过存活探针(liveness probe)检查容器是否存活.如果探测失败,Kubernetes将定期执行探针并重新启动容器. 官方文档请见:https://kube ...
- k8s创建资源的两种方式及DaemonSet应用(5)
一.创建方式分类 Kubernetes 支持两种方式创建资源: (1)用 kubectl 命令直接创建,比如: kubectl run httpd-app --image=reg.yunwei.com ...
- k8s daemonset controller源码分析
daemonset controller分析 daemonset controller简介 daemonset controller是kube-controller-manager组件中众多控制器中的 ...
- Kubernetes的DaemonSet(下篇)
用Daemon Pod来进行通信 使用Pod来再DaemonSet中通信的手段有: 推的方式:在DaemonSet中的Pod会被配置成发送更新到如状态数据库这样的服务.这些都没有客户端. IP+端口方 ...
- Kubernetes的DaemonSet(上篇)
背景 静儿作为美团容器化团队HULK的一员,经常需要和Kubernetes(k8s)打交道.第一次登陆node(宿主机)的时候,发现连续登陆几台都看到了Prometheus-Node-Exporter ...
- Kubernetes学习之路(十三)之Pod控制器--DaemonSet
一.什么是DaemonSet? DaemonSet 确保全部(或者一些)Node 上运行一个 Pod 的副本.当有 Node 加入集群时,也会为他们新增一个 Pod .当有 Node 从集群移除时,这 ...
- DaemonSet
What is a DaemonSet? DaemonSet能够让所有(或者一些特定)的Node节点运行同一个pod.当节点加入到kubernetes集群中,pod会被(DaemonSet)调度到该节 ...
随机推荐
- Java7语法新特性
Java7语法新特性: 1. switch中增加对String类型的支持. public String generate(String name, String gender) { String ti ...
- C#中的String与string
在C#中,string 是 System.String 的别名,所以基本上在使用时是没有差别的. 习惯上,我们把字符串当作对象时(有值的对象实体),我们用string. 而我们把它当类时(需要字符串类 ...
- HTTP 无状态啊无状态啊
无状态的根本原因 根本原因是:因为,HTTP协议使用的是Socket套接字TCP连接的,每次监听到的套接字连接是不可能一个个保存起来的.(很消耗资源,假如一个人服务器只保存一个通信连接,一万个岂不是要 ...
- Android之在应用程序内部关注某人的微信
Intent intent = new Intent(Intent.ACTION_VIEW); intent.setPackage("com.tencent.mm");//直接打开 ...
- jenkins error: "no valid crumb was included in the request"
一.问题描述(Problem Description): 在jenkins中创建新任务时候选择“拷贝已存在任务”,点击OK,跳转到下一步时候弹出如下错误信息:"No valid crumb ...
- poj 2585 Window Pains 解题报告
Window Pains Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2027 Accepted: 1025 Desc ...
- LZO 使用和介绍
LZO说明 摘要 LZO 是一个用 ANSI C 语言编写的无损压缩库.他能够提供非常快速的压缩和解压功能.解压并不需要内存的支持.即使使用非常大的压缩比例进行缓慢压缩出的数据,依然能够非常快速的解压 ...
- go语言基础之切片的创建和截取
1.切片的创建 示例: package main //必须有个main包 import "fmt" func main() { //切片和数组的区别 //数组[]里面的长度时固定的 ...
- Python的知识点 plt.plot()函数细节
1.plt.plot(x,y,format_string,**kwargs) 转自点击打开链接x轴数据,y轴数据,format_string控制曲线的格式字串 format_string 由颜色字符, ...
- Winform中产生验证码图片
1.创建ValidCode类: public class ValidCode { #region Private Fields private const double PI = 3.14159265 ...