OpenShift DaemonSet Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 35: Line 35:
<font color=red>TODO: https://docs.openshift.com/container-platform/3.5/dev_guide/daemonsets.html#dev-guide-creating-daemonsets</font>
<font color=red>TODO: https://docs.openshift.com/container-platform/3.5/dev_guide/daemonsets.html#dev-guide-creating-daemonsets</font>


=Updating Daemon Sets=


=Updating Pods Managed by DaemonSets=


Currently, updating a daemonset’s pod template does not affect the pod replicas that are already instantiated.
As long as a pod managed by a DaemonSet is running, it is impervious to changes in its own template: the DaemonSet won't react and attempt to stop it and recreate it. This behavior is consistent with the [[OpenShift Concepts#Pod_Configuration|static nature of running pods]]. Moreover, if the definition of a DaemonSet-managed pod is completely deleted, and then recreated based on a new template, but the same label selector, the DaemonSet will recognize any running pod replicas as having matching labels and thus will not update them or create new replicas despite a mismatch in the pod template.


 
To update the pods managed by a DaemonSet, update the pod's template, and force new pod replica creation by deleting the existing replicas.
Moreover, if you delete a daemonset and then create a new daemonset with a different template but the same label selector, it will recognize any existing pod replicas as having matching labels and thus will not update them or create new replicas despite a mismatch in the pod template.
 
To update a daemonset, force new pod replicas to be created by deleting the old replicas or nodes.
 
[[OpenShift Concepts#Pod_Configuration]]

Revision as of 22:39, 30 July 2017

External

Internal

Obtaining Information about DaemonSets

The name of the DaemonSet that manages a pod is available in pod's "oc describe pod" output, as value for the "Controllers:" label. That value can be used to get the DaemonSet definition:

 oc describe DaemonSet/<daemon-set-name>

Example:

 oc describe DaemonSet/logging-fluentd
Name:		logging-fluentd
Image(s):	registry.access.redhat.com/openshift3/logging-fluentd:3.5.0
Selector:	component=fluentd,provider=openshift
Node-Selector:	logging-infra-fluentd=true
Labels:		component=fluentd
		logging-infra=fluentd
		provider=openshift
Desired Number of Nodes Scheduled: 7
Current Number of Nodes Scheduled: 7
Number of Nodes Misscheduled: 0
Pods Status:	2 Running / 0 Waiting / 0 Succeeded / 5 Failed
No events.

Creating Daemon Sets

TODO: https://docs.openshift.com/container-platform/3.5/dev_guide/daemonsets.html#dev-guide-creating-daemonsets


Updating Pods Managed by DaemonSets

As long as a pod managed by a DaemonSet is running, it is impervious to changes in its own template: the DaemonSet won't react and attempt to stop it and recreate it. This behavior is consistent with the static nature of running pods. Moreover, if the definition of a DaemonSet-managed pod is completely deleted, and then recreated based on a new template, but the same label selector, the DaemonSet will recognize any running pod replicas as having matching labels and thus will not update them or create new replicas despite a mismatch in the pod template.

To update the pods managed by a DaemonSet, update the pod's template, and force new pod replica creation by deleting the existing replicas.