24 KiB
DaemonSet v1beta1
bdocs-tab:kubectl DaemonSet Config to print the
hostname
on each Node in the cluster every 10 seconds.
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
# Unique key of the DaemonSet instance
name: daemonset-example
spec:
template:
metadata:
labels:
app: daemonset-example
spec:
containers:
# This container is run once on each Node in the cluster
- name: daemonset-example
image: ubuntu:trusty
command:
- /bin/sh
args:
- -c
# This script is run through `sh -c <script>`
- >-
while [ true ]; do
echo "DaemonSet running on $(hostname)" ;
sleep 10 ;
done
bdocs-tab:curl DaemonSet Config to print the
hostname
on each Node in the cluster every 10 seconds.
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
# Unique key of the DaemonSet instance
name: daemonset-example
spec:
template:
metadata:
labels:
app: daemonset-example
spec:
containers:
# This container is run once on each Node in the cluster
- name: daemonset-example
image: ubuntu:trusty
command:
- /bin/sh
args:
- -c
# This script is run through `sh -c <script>`
- >-
while [ true ]; do
echo "DaemonSet running on $(hostname)" ;
sleep 10 ;
done
Group | Version | Kind |
---|---|---|
Extensions | v1beta1 | DaemonSet |
DaemonSet represents the configuration of a daemon set.
Field | Description |
---|---|
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: http://releases.k8s.io/HEAD/docs/devel/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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds |
metadata ObjectMeta |
Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata |
spec DaemonSetSpec |
Spec defines the desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status |
status DaemonSetStatus |
Status is the current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status |
DaemonSetSpec v1beta1
Field | Description |
---|---|
selector LabelSelector |
Selector is a label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors |
template PodTemplateSpec |
Template is the 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). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template |
DaemonSetStatus v1beta1
Field | Description |
---|---|
currentNumberScheduled integer |
CurrentNumberScheduled is the number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md |
desiredNumberScheduled integer |
DesiredNumberScheduled is the total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md |
numberMisscheduled integer |
NumberMisscheduled is the number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md |
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 and ready. |
DaemonSetList v1beta1
Field | Description |
---|---|
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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources |
items DaemonSet array |
Items is a list of daemon sets. |
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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds |
metadata ListMeta |
Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata |
Write Operations
See supported operations below...
Create
bdocs-tab:kubectl
kubectl
Command
$ echo 'apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: daemonset-example
spec:
template:
metadata:
labels:
app: daemonset-example
spec:
containers:
- name: daemonset-example
image: ubuntu:trusty
command:
- /bin/sh
args:
- -c
- >-
while [ true ]; do
echo "DaemonSet running on $(hostname)" ;
sleep 10 ;
done
' | kubectl create -f -
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
$ kubectl proxy
$ curl -X POST -H 'Content-Type: application/yaml' --data '
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: daemonset-example
spec:
template:
metadata:
labels:
app: daemonset-example
spec:
containers:
- name: daemonset-example
image: ubuntu:trusty
command:
- /bin/sh
args:
- -c
- >-
while [ true ]; do
echo "DaemonSet running on $(hostname)" ;
sleep 10 ;
done
' http://127.0.0.1:8001/apis/extensions/v1beta1/namespaces/default/daemonsets
bdocs-tab:kubectl Output
daemonset "daemonset-example" created
bdocs-tab:curl Response Body
{
"kind": "DaemonSet",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "daemonset-example",
"namespace": "default",
"selfLink": "/apis/extensions/v1beta1/namespaces/default/daemonsets/daemonset-example",
"uid": "65552ced-b0e2-11e6-aef0-42010af00229",
"resourceVersion": "3558",
"generation": 1,
"creationTimestamp": "2016-11-22T18:35:09Z",
"labels": {
"app": "daemonset-example"
}
},
"spec": {
"selector": {
"matchLabels": {
"app": "daemonset-example"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "daemonset-example"
}
},
"spec": {
"containers": [
{
"name": "daemonset-example",
"image": "ubuntu:trusty",
"command": [
"/bin/sh"
],
"args": [
"-c",
"while [ true ]; do echo \"DaemonSet running on $(hostname)\" ; sleep 10 ; done"
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Always",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {}
}
}
},
"status": {
"currentNumberScheduled": 0,
"numberMisscheduled": 0,
"desiredNumberScheduled": 0
}
}
create a DaemonSet
HTTP Request
POST /apis/extensions/v1beta1/namespaces/{namespace}/daemonsets
Path Parameters
Parameter | Description |
---|---|
namespace | object name and auth scope, such as for teams and projects |
Query Parameters
Parameter | Description |
---|---|
pretty | If 'true', then the output is pretty printed. |
Body Parameters
Parameter | Description |
---|---|
body DaemonSet |
Response
Code | Description |
---|---|
200 DaemonSet |
OK |
Replace
bdocs-tab:kubectl
kubectl
Command
Coming Soon
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
Coming Soon
bdocs-tab:kubectl Output
Coming Soon
bdocs-tab:curl Response Body
Coming Soon
replace the specified DaemonSet
HTTP Request
PUT /apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}
Path Parameters
Parameter | Description |
---|---|
name | name of the DaemonSet |
namespace | object name and auth scope, such as for teams and projects |
Query Parameters
Parameter | Description |
---|---|
pretty | If 'true', then the output is pretty printed. |
Body Parameters
Parameter | Description |
---|---|
body DaemonSet |
Response
Code | Description |
---|---|
200 DaemonSet |
OK |
Patch
bdocs-tab:kubectl
kubectl
Command
Coming Soon
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
Coming Soon
bdocs-tab:kubectl Output
Coming Soon
bdocs-tab:curl Response Body
Coming Soon
partially update the specified DaemonSet
HTTP Request
PATCH /apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}
Path Parameters
Parameter | Description |
---|---|
name | name of the DaemonSet |
namespace | object name and auth scope, such as for teams and projects |
Query Parameters
Parameter | Description |
---|---|
pretty | If 'true', then the output is pretty printed. |
Body Parameters
Parameter | Description |
---|---|
body Patch |
Response
Code | Description |
---|---|
200 DaemonSet |
OK |
Delete
bdocs-tab:kubectl
kubectl
Command
$ kubectl delete daemonset daemonset-example
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
$ kubectl proxy
$ curl -X DELETE -H 'Content-Type: application/yaml' --data '
gracePeriodSeconds: 0
orphanDependents: false
' 'http://127.0.0.1:8001/apis/extensions/v1beta1/namespaces/default/daemonsets/daemonset-example'
bdocs-tab:kubectl Output
daemonset "daemonset-example" deleted
bdocs-tab:curl Response Body
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Success",
"code": 200
}
delete a DaemonSet
HTTP Request
DELETE /apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}
Path Parameters
Parameter | Description |
---|---|
name | name of the DaemonSet |
namespace | object name and auth scope, such as for teams and projects |
Query Parameters
Parameter | Description |
---|---|
pretty | If 'true', then the output is pretty printed. |
gracePeriodSeconds | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. |
orphanDependents | Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. |
Body Parameters
Parameter | Description |
---|---|
body DeleteOptions |
Response
Code | Description |
---|---|
200 Status |
OK |
Delete Collection
bdocs-tab:kubectl
kubectl
Command
Coming Soon
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
Coming Soon
bdocs-tab:kubectl Output
Coming Soon
bdocs-tab:curl Response Body
Coming Soon
delete collection of DaemonSet
HTTP Request
DELETE /apis/extensions/v1beta1/namespaces/{namespace}/daemonsets
Path Parameters
Parameter | Description |
---|---|
namespace | object name and auth scope, such as for teams and projects |
Query Parameters
Parameter | Description |
---|---|
pretty | If 'true', then the output is pretty printed. |
fieldSelector | A selector to restrict the list of returned objects by their fields. Defaults to everything. |
labelSelector | A selector to restrict the list of returned objects by their labels. Defaults to everything. |
resourceVersion | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. |
timeoutSeconds | Timeout for the list/watch call. |
watch | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
Response
Code | Description |
---|---|
200 Status |
OK |
Read Operations
See supported operations below...
Read
bdocs-tab:kubectl
kubectl
Command
$ kubectl get daemonset daemonset-example -o json
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
$ kubectl proxy
$ curl -X GET http://127.0.0.1:8001/apis/extensions/v1beta1/namespaces/default/daemonsets/daemonset-example
bdocs-tab:kubectl Output
bdocs-tab:curl Response Body
read the specified DaemonSet
HTTP Request
GET /apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}
Path Parameters
Parameter | Description |
---|---|
name | name of the DaemonSet |
namespace | object name and auth scope, such as for teams and projects |
Query Parameters
Parameter | Description |
---|---|
pretty | If 'true', then the output is pretty printed. |
exact | Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' |
export | Should this value be exported. Export strips fields that a user can not specify. |
Response
Code | Description |
---|---|
200 DaemonSet |
OK |
List
bdocs-tab:kubectl
kubectl
Command
Coming Soon
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
Coming Soon
bdocs-tab:kubectl Output
Coming Soon
bdocs-tab:curl Response Body
Coming Soon
list or watch objects of kind DaemonSet
HTTP Request
GET /apis/extensions/v1beta1/namespaces/{namespace}/daemonsets
Path Parameters
Parameter | Description |
---|---|
namespace | object name and auth scope, such as for teams and projects |
Query Parameters
Parameter | Description |
---|---|
pretty | If 'true', then the output is pretty printed. |
fieldSelector | A selector to restrict the list of returned objects by their fields. Defaults to everything. |
labelSelector | A selector to restrict the list of returned objects by their labels. Defaults to everything. |
resourceVersion | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. |
timeoutSeconds | Timeout for the list/watch call. |
watch | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
Response
Code | Description |
---|---|
200 DaemonSetList |
OK |
List All Namespaces
bdocs-tab:kubectl
kubectl
Command
Coming Soon
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
Coming Soon
bdocs-tab:kubectl Output
Coming Soon
bdocs-tab:curl Response Body
Coming Soon
list or watch objects of kind DaemonSet
HTTP Request
GET /apis/extensions/v1beta1/daemonsets
Query Parameters
Parameter | Description |
---|---|
fieldSelector | A selector to restrict the list of returned objects by their fields. Defaults to everything. |
labelSelector | A selector to restrict the list of returned objects by their labels. Defaults to everything. |
pretty | If 'true', then the output is pretty printed. |
resourceVersion | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. |
timeoutSeconds | Timeout for the list/watch call. |
watch | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
Response
Code | Description |
---|---|
200 DaemonSetList |
OK |
Watch
bdocs-tab:kubectl
kubectl
Command
Coming Soon
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
Coming Soon
bdocs-tab:kubectl Output
Coming Soon
bdocs-tab:curl Response Body
Coming Soon
watch changes to an object of kind DaemonSet
HTTP Request
GET /apis/extensions/v1beta1/watch/namespaces/{namespace}/daemonsets/{name}
Path Parameters
Parameter | Description |
---|---|
name | name of the DaemonSet |
namespace | object name and auth scope, such as for teams and projects |
Query Parameters
Parameter | Description |
---|---|
fieldSelector | A selector to restrict the list of returned objects by their fields. Defaults to everything. |
labelSelector | A selector to restrict the list of returned objects by their labels. Defaults to everything. |
pretty | If 'true', then the output is pretty printed. |
resourceVersion | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. |
timeoutSeconds | Timeout for the list/watch call. |
watch | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
Response
Code | Description |
---|---|
200 Event |
OK |
Watch List All Namespaces
bdocs-tab:kubectl
kubectl
Command
Coming Soon
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
Coming Soon
bdocs-tab:kubectl Output
Coming Soon
bdocs-tab:curl Response Body
Coming Soon
watch individual changes to a list of DaemonSet
HTTP Request
GET /apis/extensions/v1beta1/watch/daemonsets
Query Parameters
Parameter | Description |
---|---|
fieldSelector | A selector to restrict the list of returned objects by their fields. Defaults to everything. |
labelSelector | A selector to restrict the list of returned objects by their labels. Defaults to everything. |
pretty | If 'true', then the output is pretty printed. |
resourceVersion | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. |
timeoutSeconds | Timeout for the list/watch call. |
watch | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
Response
Code | Description |
---|---|
200 Event |
OK |
Status Operations
See supported operations below...
Patch Status
bdocs-tab:kubectl
kubectl
Command
Coming Soon
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
Coming Soon
bdocs-tab:kubectl Output
Coming Soon
bdocs-tab:curl Response Body
Coming Soon
partially update status of the specified DaemonSet
HTTP Request
PATCH /apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status
Path Parameters
Parameter | Description |
---|---|
name | name of the DaemonSet |
namespace | object name and auth scope, such as for teams and projects |
Query Parameters
Parameter | Description |
---|---|
pretty | If 'true', then the output is pretty printed. |
Body Parameters
Parameter | Description |
---|---|
body Patch |
Response
Code | Description |
---|---|
200 DaemonSet |
OK |
Read Status
bdocs-tab:kubectl
kubectl
Command
Coming Soon
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
Coming Soon
bdocs-tab:kubectl Output
Coming Soon
bdocs-tab:curl Response Body
Coming Soon
read status of the specified DaemonSet
HTTP Request
GET /apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status
Path Parameters
Parameter | Description |
---|---|
name | name of the DaemonSet |
namespace | object name and auth scope, such as for teams and projects |
Query Parameters
Parameter | Description |
---|---|
pretty | If 'true', then the output is pretty printed. |
Response
Code | Description |
---|---|
200 DaemonSet |
OK |
Replace Status
bdocs-tab:kubectl
kubectl
Command
Coming Soon
bdocs-tab:curl
curl
Command (requireskubectl proxy
to be running)
Coming Soon
bdocs-tab:kubectl Output
Coming Soon
bdocs-tab:curl Response Body
Coming Soon
replace status of the specified DaemonSet
HTTP Request
PUT /apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status
Path Parameters
Parameter | Description |
---|---|
name | name of the DaemonSet |
namespace | object name and auth scope, such as for teams and projects |
Query Parameters
Parameter | Description |
---|---|
pretty | If 'true', then the output is pretty printed. |
Body Parameters
Parameter | Description |
---|---|
body DaemonSet |
Response
Code | Description |
---|---|
200 DaemonSet |
OK |