如何在部署daemonset时重现没有pod就绪?
我举一个小例子:
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fluentd
namespace: logging
labels:
app: fluentd-logging
spec:
selector:
matchLabels:
name: fluentd
template:
metadata:
labels:
name: fluentd
spec:
containers:
- name: fluentd-elasticsearch
image: quay.io/fluentd_elasticsearch/fluentd:v2.5.2
resources:
limits:
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- name: varlog
mountPath: /var/log
terminationGracePeriodSeconds: 30
volumes:
- name: varlog
hostPath:
path: /var/log
接下来的问题是如何使用字段选择器获取daemonset错误的事件?
involvedObject.kind=Daemonset,involvedObject.name="{daemonset-name}”
1条答案
按热度按时间c6ubokkw1#
要设置为DaemonSet的未就绪pod,您只需添加一个永远不会就绪的就绪探测器。
要检查pod状态,可以使用
kubetcl describe pod <nameofyourdaemonsetpodcreated>
在输出中,您将获得:
希望能帮上忙!
Cose贝儿!