engineerX
engineerX

Reputation: 3275

Openshift temporarily knock-out a container

I have the EFK stack deployed for logging on an openshift 3.6 cluster with the standard Ansible playbook provided by openshift. So there is one fluentd pod running on every node of the cluster and two elasticsearch containers in total.

I would like to temporarily disable a fluentd container. When I delete the pod, a new one is started in its place after a few seconds because of the DaemonSet. How could I prolong the time that the fluentd pod is down?

Upvotes: 0

Views: 432

Answers (2)

ptrk
ptrk

Reputation: 1840

Another approach would be to mark the node as "unschedulable", which blocks new PODs from being assigned there, and then deleting the fluentd POD. The downside is, the applications will not be able to put their PODs on this node either, however existing ones would remain.

# disable a node from taking PODs
oadm manage-node node1.example.com --schedulable=false
# a blanket bombing of fluentd
oc -n logging delete pods --all

# enable it back
oadm manage-node node1.example.com --schedulable=true
oc -n logging delete pods --all

Upvotes: 0

Keerthivarman
Keerthivarman

Reputation: 111

You can change the node selector label on Daemon set of fluentd

oc edit ds logging-fluentd

nodeSelector: logging-infra-fluentd: "true"

Change the value "true" to "false" ,save,and delete the fluentd pod it will not create again.

Upvotes: 2

Related Questions