列出所有的DaemonSet
功能介绍
This API is used to list all DemonSet resource objects.
URI
GET /apis/apps/v1/daemonsets
参数 |
是否必选 |
描述 |
---|---|---|
fieldSelector |
No |
A selector to restrict the list of returned objects by their fields. Defaults to everything. |
includeUninitialized |
No |
If true, partially initialized resources are included in the response. |
labelSelector |
No |
A selector to restrict the list of returned objects by their labels. Defaults to everything. |
pretty |
No |
If 'true', then the output is pretty printed. |
resourceVersion |
No |
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. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. |
timeoutSeconds |
No |
Timeout for the list/watch call. |
watch |
No |
Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
请求消息
N/A
响应消息
响应参数:
参数 |
参数类型 |
描述 |
---|---|---|
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. |
items |
Array of strings |
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. |
metadata |
metadata object |
Standard list metadata. |
参数 |
参数类型 |
描述 |
---|---|---|
resourceVersion |
String |
String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. |
selfLink |
String |
SelfLink is a URL representing this object. Populated by the system. Read-only. |
响应示例:
{ "kind": "DaemonSetList", "apiVersion": "extensions/v1beta1", "metadata": { "selfLink": "/apis/extensions/v1beta1/daemonsets", "resourceVersion": "419049" }, "items": [ { "metadata": { "name": "icagent", "namespace": "default", "selfLink": "/apis/extensions/v1beta1/namespaces/default/daemonsets/icagent", "uid": "ac2cd485-dc8e-11e7-9c19-fa163e2d897b", "resourceVersion": "23583", "generation": 1, "creationTimestamp": "2017-12-09T03:11:39Z", "labels": { "name": "icagent" }, "enable": true }, "spec": { "selector": { "matchLabels": { "app": "icagent" } }, "template": { "metadata": { "creationTimestamp": null, "labels": { "app": "icagent" }, "annotations": { "scheduler.alpha.kubernetes.io/tolerations": "[{\"key\":\"beta.k8s.io/accepted-app\",\"operator\":\"Exists\", \"effect\":\"NoSchedule\"}]" }, "enable": true }, "spec": { "restartPolicy": "Always", "terminationGracePeriodSeconds": 30, "dnsPolicy": "ClusterFirst", "securityContext": {}, "imagePullSecrets": [ { "name": "default_secrets" } ], "schedulerName": "default-scheduler", "processes": [ { "name": "icagent", "package": "https://172.16.5.235:20202/swr/v2/domains/op_svc_apm/namespaces/op_svc_apm/repositories/default/packages/icagent-repo/versions/5.6.67/file_paths/ICProbeAgent-5.6.67.zip", "env": [ { "name": "cluster_id", "value": "8bfd2e95-dc8d-11e7-8766-0255ac101a0c" }, { "name": "cluster_name", "value": "test-1209" } ], "resources": {}, "livenessProbe": { "exec": { "command": [ "/bin/bash", "-c", "curl --connect-timeout 5 -m 5 http://127.0.0.1:28002/health 2>/dev/null | /usr/bin/grep -w 200 | /usr/bin/grep -v /usr/bin/grep 1>/dev/null" ] }, "initialDelaySeconds": 15, "timeoutSeconds": 5, "periodSeconds": 10, "successThreshold": 1, "failureThreshold": 3 }, "lifecycle": { "install": { "exec": { "command": [ "/bin/bash", "bin/manual/setup.sh", "-ip", "172.16.5.235:9999", "-localip", "127.0.0.1", "-user", "root" ] } }, "uninstall": { "exec": { "command": [ "/bin/bash", "-c", "/bin/bash bin/manual/uninstall.sh" ] } }, "start": { "exec": { "command": [ "/bin/bash", "-c", "cd /opt/oss/servicemgr/ICAgent/bin/manual/;/bin/bash mstart.sh" ] } }, "restart": { "exec": { "command": [ "/bin/bash", "-c", "cd /opt/oss/servicemgr/ICAgent/bin/manual/;/bin/bash mstop.sh;/bin/bash mstart.sh" ] } }, "stop": { "exec": { "command": [ "/bin/bash", "-c", "cd /opt/oss/servicemgr/ICAgent/bin/manual/;/bin/bash mstop.sh" ] } }, "update": { "exec": { "command": [ "" ] } } } } ] } }, "updateStrategy": { "type": "OnDelete" }, "templateGeneration": 1, "revisionHistoryLimit": 10 }, "status": { "currentNumberScheduled": 1, "numberMisscheduled": 0, "desiredNumberScheduled": 1, "numberReady": 1, "observedGeneration": 1, "updatedNumberScheduled": 1, "numberAvailable": 1 } }, { "metadata": { "name": "ds-12130306", "namespace": "ns-12130306-s", "selfLink": "/apis/extensions/v1beta1/namespaces/ns-12130306-s/daemonsets/ds-12130306", "uid": "dc72a82b-dfb3-11e7-9c19-fa163e2d897b", "resourceVersion": "419012", "generation": 1, "creationTimestamp": "2017-12-13T03:15:24Z", "labels": { "name": "daemonset-test" }, "enable": true }, "spec": { "selector": { "matchLabels": { "name": "daemonset-test" } }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "daemonset-test" }, "enable": true }, "spec": { "containers": [ { "name": "dscon-12130306", "image": "172.16.5.235:20202/test/redis:latest", "resources": {}, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File", "imagePullPolicy": "IfNotPresent" } ], "restartPolicy": "Always", "terminationGracePeriodSeconds": 30, "dnsPolicy": "ClusterFirst", "securityContext": {}, "schedulerName": "default-scheduler" } }, "updateStrategy": { "type": "OnDelete" }, "templateGeneration": 1, "revisionHistoryLimit": 10 }, "status": { "currentNumberScheduled": 1, "numberMisscheduled": 0, "desiredNumberScheduled": 1, "numberReady": 1, "observedGeneration": 1, "updatedNumberScheduled": 1, "numberAvailable": 1 } } ] }
