Search

Chapter 7. DaemonSet [apps/v1]

download PDF
Description
DaemonSet represents the configuration of a daemon set.
Type
object

7.1. Specification

PropertyTypeDescription

apiVersion

string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind

string

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata

ObjectMeta

Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec

object

DaemonSetSpec is the specification of a daemon set.

status

object

DaemonSetStatus represents the current status of a daemon set.

7.1.1. .spec

Description
DaemonSetSpec is the specification of a daemon set.
Type
object
Required
  • selector
  • template
PropertyTypeDescription

minReadySeconds

integer

The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).

revisionHistoryLimit

integer

The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.

selector

LabelSelector

A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template’s labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors

template

PodTemplateSpec

An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template’s node selector (or on every node if no node selector is specified). The only allowed template.spec.restartPolicy value is "Always". More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template

updateStrategy

object

DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.

7.1.2. .spec.updateStrategy

Description
DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
Type
object
PropertyTypeDescription

rollingUpdate

object

Spec to control the desired behavior of daemon set rolling update.

type

string

Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.

Possible enum values: - "OnDelete" Replace the old daemons only when it’s killed - "RollingUpdate" Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.

7.1.3. .spec.updateStrategy.rollingUpdate

Description
Spec to control the desired behavior of daemon set rolling update.
Type
object
PropertyTypeDescription

maxSurge

IntOrString

The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption.

maxUnavailable

IntOrString

The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.

7.1.4. .status

Description
DaemonSetStatus represents the current status of a daemon set.
Type
object
Required
  • currentNumberScheduled
  • numberMisscheduled
  • desiredNumberScheduled
  • numberReady
PropertyTypeDescription

collisionCount

integer

Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.

conditions

array

Represents the latest available observations of a DaemonSet’s current state.

conditions[]

object

DaemonSetCondition describes the state of a DaemonSet at a certain point.

currentNumberScheduled

integer

The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/

desiredNumberScheduled

integer

The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/

numberAvailable

integer

The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)

numberMisscheduled

integer

The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/

numberReady

integer

numberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running with a Ready Condition.

numberUnavailable

integer

The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)

observedGeneration

integer

The most recent generation observed by the daemon set controller.

updatedNumberScheduled

integer

The total number of nodes that are running updated daemon pod

7.1.5. .status.conditions

Description
Represents the latest available observations of a DaemonSet’s current state.
Type
array

7.1.6. .status.conditions[]

Description
DaemonSetCondition describes the state of a DaemonSet at a certain point.
Type
object
Required
  • type
  • status
PropertyTypeDescription

lastTransitionTime

Time

Last time the condition transitioned from one status to another.

message

string

A human readable message indicating details about the transition.

reason

string

The reason for the condition’s last transition.

status

string

Status of the condition, one of True, False, Unknown.

type

string

Type of DaemonSet condition.

7.2. API endpoints

The following API endpoints are available:

  • /apis/apps/v1/daemonsets

    • GET: list or watch objects of kind DaemonSet
  • /apis/apps/v1/watch/daemonsets

    • GET: watch individual changes to a list of DaemonSet. deprecated: use the 'watch' parameter with a list operation instead.
  • /apis/apps/v1/namespaces/{namespace}/daemonsets

    • DELETE: delete collection of DaemonSet
    • GET: list or watch objects of kind DaemonSet
    • POST: create a DaemonSet
  • /apis/apps/v1/watch/namespaces/{namespace}/daemonsets

    • GET: watch individual changes to a list of DaemonSet. deprecated: use the 'watch' parameter with a list operation instead.
  • /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}

    • DELETE: delete a DaemonSet
    • GET: read the specified DaemonSet
    • PATCH: partially update the specified DaemonSet
    • PUT: replace the specified DaemonSet
  • /apis/apps/v1/watch/namespaces/{namespace}/daemonsets/{name}

    • GET: watch changes to an object of kind DaemonSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
  • /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status

    • GET: read status of the specified DaemonSet
    • PATCH: partially update status of the specified DaemonSet
    • PUT: replace status of the specified DaemonSet

7.2.1. /apis/apps/v1/daemonsets

HTTP method
GET
Description
list or watch objects of kind DaemonSet
Table 7.1. HTTP responses
HTTP codeReponse body

200 - OK

DaemonSetList schema

401 - Unauthorized

Empty

7.2.2. /apis/apps/v1/watch/daemonsets

HTTP method
GET
Description
watch individual changes to a list of DaemonSet. deprecated: use the 'watch' parameter with a list operation instead.
Table 7.2. HTTP responses
HTTP codeReponse body

200 - OK

WatchEvent schema

401 - Unauthorized

Empty

7.2.3. /apis/apps/v1/namespaces/{namespace}/daemonsets

HTTP method
DELETE
Description
delete collection of DaemonSet
Table 7.3. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

Table 7.4. HTTP responses
HTTP codeReponse body

200 - OK

Status schema

401 - Unauthorized

Empty

HTTP method
GET
Description
list or watch objects of kind DaemonSet
Table 7.5. HTTP responses
HTTP codeReponse body

200 - OK

DaemonSetList schema

401 - Unauthorized

Empty

HTTP method
POST
Description
create a DaemonSet
Table 7.6. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 7.7. Body parameters
ParameterTypeDescription

body

DaemonSet schema

 
Table 7.8. HTTP responses
HTTP codeReponse body

200 - OK

DaemonSet schema

201 - Created

DaemonSet schema

202 - Accepted

DaemonSet schema

401 - Unauthorized

Empty

7.2.4. /apis/apps/v1/watch/namespaces/{namespace}/daemonsets

HTTP method
GET
Description
watch individual changes to a list of DaemonSet. deprecated: use the 'watch' parameter with a list operation instead.
Table 7.9. HTTP responses
HTTP codeReponse body

200 - OK

WatchEvent schema

401 - Unauthorized

Empty

7.2.5. /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}

Table 7.10. Global path parameters
ParameterTypeDescription

name

string

name of the DaemonSet

HTTP method
DELETE
Description
delete a DaemonSet
Table 7.11. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

Table 7.12. HTTP responses
HTTP codeReponse body

200 - OK

Status schema

202 - Accepted

Status schema

401 - Unauthorized

Empty

HTTP method
GET
Description
read the specified DaemonSet
Table 7.13. HTTP responses
HTTP codeReponse body

200 - OK

DaemonSet schema

401 - Unauthorized

Empty

HTTP method
PATCH
Description
partially update the specified DaemonSet
Table 7.14. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 7.15. HTTP responses
HTTP codeReponse body

200 - OK

DaemonSet schema

201 - Created

DaemonSet schema

401 - Unauthorized

Empty

HTTP method
PUT
Description
replace the specified DaemonSet
Table 7.16. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 7.17. Body parameters
ParameterTypeDescription

body

DaemonSet schema

 
Table 7.18. HTTP responses
HTTP codeReponse body

200 - OK

DaemonSet schema

201 - Created

DaemonSet schema

401 - Unauthorized

Empty

7.2.6. /apis/apps/v1/watch/namespaces/{namespace}/daemonsets/{name}

Table 7.19. Global path parameters
ParameterTypeDescription

name

string

name of the DaemonSet

HTTP method
GET
Description
watch changes to an object of kind DaemonSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
Table 7.20. HTTP responses
HTTP codeReponse body

200 - OK

WatchEvent schema

401 - Unauthorized

Empty

7.2.7. /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status

Table 7.21. Global path parameters
ParameterTypeDescription

name

string

name of the DaemonSet

HTTP method
GET
Description
read status of the specified DaemonSet
Table 7.22. HTTP responses
HTTP codeReponse body

200 - OK

DaemonSet schema

401 - Unauthorized

Empty

HTTP method
PATCH
Description
partially update status of the specified DaemonSet
Table 7.23. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 7.24. HTTP responses
HTTP codeReponse body

200 - OK

DaemonSet schema

201 - Created

DaemonSet schema

401 - Unauthorized

Empty

HTTP method
PUT
Description
replace status of the specified DaemonSet
Table 7.25. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 7.26. Body parameters
ParameterTypeDescription

body

DaemonSet schema

 
Table 7.27. HTTP responses
HTTP codeReponse body

200 - OK

DaemonSet schema

201 - Created

DaemonSet schema

401 - Unauthorized

Empty

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.