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)调度到该节 ...
随机推荐
- selenium3+python自动化50-环境搭建(firefox)
前言 有不少小伙伴在安装selenium环境后启动firefox报错,因为现在selenium升级到3.0了,跟2.0的版本还有有一点区别的. 安装环境过程中主要会遇到三个坑: 1.'geckodri ...
- java环境配置错误集锦
eclipse生成的文件目录 D:\eeworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps 1.java. ...
- [GIT] Git 工作流程(Git flow, Github flow flow, Git lab flow)
reference : http://www.ruanyifeng.com/blog/2015/12/git-workflow.html Git 作为一个源码管理系统,不可避免涉及到多人协作. 协作必 ...
- OpenCV学习(26) 直方图(3)
本章中我们学习一下通过backproject直方图,得到一副图像中每个像素属于该直方图的概率.在下边原始图中(左图),我们框选了一块四边形的区域,计算该区域的灰度直方图,然后通过下面的函数calcBa ...
- Python中filter、map、reduce、lambda 的用法
Python内置了一些非常有趣但非常有用的函数,充分体现了Python的语言魅力! filter(function, sequence):对sequence中的item依次执行function(ite ...
- 【C/C++】:用C实现输出日期的阴历日子
前言 输出阴历一直是个老大难的问题.由于阴历日子没有规律.所以这里须要做的就是通过打表的算法做到输出阴历日子,可是非常多人都不太了解原理,我这里就给大家送上了一个福利.把自己做好的基于打表的阴历的日子 ...
- Node.js程序在node-windows中不能运行
Node.js程序部分功能在命令行中运行良好,但在node-windows中不能运行,怎么回事? 答:路径问题. 请看如下的描述: My script runs fine on it's own, ...
- (LeetCode 83)Remove Duplicates from Sorted Lists
Given a sorted linked list, delete all duplicates such that each element appear only once. For examp ...
- Android 视频缩放/放大
1. 原理 不直接改变Codec输出的视频宽高比,而是改变视频播放器窗体的大小. 2. 设置Window 须要将Window设置未能够超出屏幕尺寸 mWindow.setFlags(WindowMan ...
- PHP高级教程-Cookie
PHP Cookie cookie 常用于识别用户. Cookie 是什么? cookie 常用于识别用户.cookie 是一种服务器留在用户计算机上的小文件.每当同一台计算机通过浏览器请求页面时,这 ...