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)调度到该节 ...
随机推荐
- 手机网站和PC网站兼容的响应式网页设计
今天跟大家介绍的这个网站叫 媒体查询 官网域名:http://mediaqueri.es/ 该酷站收集了很多响应式设计的案例.全部都是收集的一些励志精美而时尚的网站,使用媒体查询和响应的网页设计. ...
- spring IOC的常见几种以来注入的方式
在spring ioc中有三种依赖注入,分别是:a.接口注入:b.setter方法注入:c.构造方法注入: 接口注入: public class ClassA { private InterfaceB ...
- 洛谷P1772 [ZJOI2006]物流运输 题解
题目描述 物流公司要把一批货物从码头A运到码头B.由于货物量比较大,需要n天才能运完.货物运输过程中一般要转停好几个码头.物流公司通常会设计一条固定的运输路线,以便对整个运输过程实施严格的管理和跟踪. ...
- Visual Studio Code 构建C/C++开发环境
转自: https://blog.csdn.net/lidong_12664196/article/details/68928136#visual-sutdio-code%E4%BB%A5%E5%8F ...
- [置顶] Django 微信开发(一)——环境搭建
Django 微信开发(一)——环境搭建 随着移动互联网时代的到来,微信——一个改变着我们生活的产品悄悄走近了我们的生活.我们不得不觉得自己很幸运,自己能在这个世界上遇到像QQ.微博.微信这样优秀的产 ...
- Hello World with Ant
都说Linux环境下的程序员如果不会使用GNU make来构建和管理自己的工程,应该不能算是一个合格的专业程序员,至少不能称得上是Unix程序员. 而在一说到Ant的时候,很多人就把这两个的功能对比来 ...
- SQL Server’s Storage Top 10 Best Practices
好文章, 简明扼要. Storage Top 10 Best Practices http://technet.microsoft.com/en-us/library/cc966534.aspx
- AngularJS 用 $http.jsonp 跨域SyntaxError问题
必须添加参数:callback=JSON_CALLBACK , 才能进success方法,如下: $http.jsonp("https://request.address.json?call ...
- $.jsonp()的简单使用
// jsonp 获取 json 数据: $.jsonp({ url: GLOBAL.baseUrl + '/company/mobi_getposter.action', callback: 'ca ...
- Android -- 重置Bitmap大小&&Bitmap转角度
重置Bitmap大小 Bitmap bitMap = ...