学习有关Pod对象的相关api调用以及返回json数据格式

api文档:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#

k8s的api更新很快,注意版本,以1.12为例进行详解:

K8S API概览

资源对象

namedecription
WorkloadsWorkloads are objects you use to manage and run your containers on the cluster.
Discovery & LBDiscovery & LB resources are objects you use to "stitch" your workloads together into an externally accessible, load-balanced Service.
Config & StorageConfig & Storage resources are objects you use to inject initialization data into your applications, and to persist data that is external to your container.
ClusterCluster resources objects define how the cluster itself is configured; these are typically used only by cluster operators.
MetadataMetadata resources are objects you use to configure the behavior of other resources within the cluster, such as HorizontalPodAutoscaler for scaling workloads.

主要介绍了集群的主要对象以及作用,主要学习Pod, Node等关键对象的API

资源对象的主要组件:

namedecription
Resource ObjectMetaResource ObjectMeta: This is metadata about the resource, such as its name, type, api version, annotations, and labels. This contains fields that maybe updated both by the end user and the system (e.g. annotations)
ResourceSpec

ResourceSpec: This is defined by the user and describes the desired state of system. Fill this in when creating or updating an object.

ResourceStatus

ResourceStatus: This is filled in by the server and reports the current state of the system. In most cases, users don't need to change this.

重点是Spec部分,主要介绍了定制资源对象的主要API

资源对象操作:

namedescribe
CreateCreate operations will create the resource in the storage backend. After a resource is create the system will apply the desired state.
UpdateReplaceReplacing a resource object will update the resource by replacing the existing spec with the provided one. For read-then-write operations this is safe because an optimistic lock failure will occur if the resource was modified between the read and write
PatchPatch will apply a change to a specific field. How the change is merged is defined per field. Lists may either be replaced or merged. Merging lists will not preserve ordering.
Patches will never cause optimistic locking failures, and the last write will win
ReadGetGet will retrieve a specific resource object by name.
ListList will retrieve all resource objects of a specific type within a namespace, and the results can be restricted to resources matching a selector query
WatchWatch will stream results for an object(s) as it is updated. Similar to a callback, watch is used to respond to resource changes.
DeleteRollbackRollback a PodTemplate to a previous version
Read / Write ScaleRead or Update the number of replicas for the given resource
Read / Write StatusRead or Update the Status for a resource object.

Pod对象API

与Pod有关的对象类:

这一部分类之间关联关系复杂,以后慢慢研究

给Node节点创建label  kubectl label nodes <node-name> <label-key>=<label-value>
查看labels  kubectl get nodes --show-labels

API调用实例

如图所示,现在default namespace 启动了三个Pod  busybox   centos  tomcat

列出某个命名空间下所有Pod对象:

api/v1/namespaces/default/pods

{"kind":"PodList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces/default/pods/","resourceVersion":"857561"},"items":[{"metadata":{"name":"busybox-68f48b9c57-887mw","generateName":"busybox-68f48b9c57-","namespace":"default","selfLink":"/api/v1/namespaces/default/pods/busybox-68f48b9c57-887mw","uid":"658c990f-f76e-11e8-953c-a0a33bc4c0eb","resourceVersion":"689769","creationTimestamp":"2018-12-04T02:43:35Z","labels":{"pod-template-hash":"68f48b9c57","run":"busybox"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"ReplicaSet","name":"busybox-68f48b9c57","uid":"d3cfd753-f76d-11e8-953c-a0a33bc4c0eb","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"default-token-fw46g","secret":{"secretName":"default-token-fw46g","defaultMode":420}}],"containers":[{"name":"busybox","image":"busybox","args":["/bin/sh"],"resources":{},"volumeMounts":[{"name":"default-token-fw46g","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always","stdin":true,"tty":true}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","nodeName":"ac-private-2","securityContext":{},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0},"status":{"phase":"Running","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-04T02:43:35Z"},{"type":"Ready","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-04T02:47:14Z"},{"type":"ContainersReady","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-04T02:47:14Z"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-04T02:43:35Z"}],"hostIP":"192.168.1.19","podIP":"10.244.1.85","startTime":"2018-12-04T02:43:35Z","containerStatuses":[{"name":"busybox","state":{"running":{"startedAt":"2018-12-04T02:47:13Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"docker.io/busybox:latest","imageID":"docker-pullable://docker.io/busybox@sha256:2a03a6059f21e150ae84b0973863609494aad70f0a80eaeb64bddd8d92465812","containerID":"docker://710df306fe639930c9646c663714d50d1249b83452e94106fcb4fc6d83cdb50d"}],"qosClass":"BestEffort"}},{"metadata":{"name":"centos-ssh","namespace":"default","selfLink":"/api/v1/namespaces/default/pods/centos-ssh","uid":"79ebcd22-f84e-11e8-953c-a0a33bc4c0eb","resourceVersion":"843562","creationTimestamp":"2018-12-05T05:27:37Z","labels":{"name":"centos-ssh"}},"spec":{"volumes":[{"name":"data","hostPath":{"path":"/dev/sdk","type":""}},{"name":"default-token-fw46g","secret":{"secretName":"default-token-fw46g","defaultMode":420}}],"containers":[{"name":"centos-ssh","image":"docker.io/chenwenkai123456/centos-ssh:v1","command":["/usr/sbin/sshd","-D"],"ports":[{"hostPort":30015,"containerPort":22,"protocol":"TCP"}],"resources":{"limits":{"cpu":"4","memory":"8Gi"},"requests":{"cpu":"2","memory":"4Gi"}},"volumeMounts":[{"name":"data","mountPath":"/data"},{"name":"default-token-fw46g","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","nodeName":"xjs-dn04","securityContext":{},"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"type","operator":"In","values":["node4"]}]}]}}},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0},"status":{"phase":"Running","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:27:37Z"},{"type":"Ready","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:27:40Z"},{"type":"ContainersReady","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:27:40Z"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:27:37Z"}],"hostIP":"192.168.1.16","podIP":"10.244.4.21","startTime":"2018-12-05T05:27:37Z","containerStatuses":[{"name":"centos-ssh","state":{"running":{"startedAt":"2018-12-05T05:27:39Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"docker.io/chenwenkai123456/centos-ssh:v1","imageID":"docker-pullable://docker.io/chenwenkai123456/centos-ssh@sha256:ae6b8990ff39d54179443faace89fb2f26605bc76e56d435d2f804da099d7f83","containerID":"docker://6feaa58048bc482ce7e08b4344adae6acec2bd6bcacc563c6140ce26e295e17a"}],"qosClass":"Burstable"}},{"metadata":{"name":"tomcat-t6q74","generateName":"tomcat-","namespace":"default","selfLink":"/api/v1/namespaces/default/pods/tomcat-t6q74","uid":"aacb0cc9-f850-11e8-953c-a0a33bc4c0eb","resourceVersion":"845174","creationTimestamp":"2018-12-05T05:43:18Z","labels":{"app":"tomcat"},"ownerReferences":[{"apiVersion":"v1","kind":"ReplicationController","name":"tomcat","uid":"aac9e59d-f850-11e8-953c-a0a33bc4c0eb","controller":true,"blockOwnerDeletion":true}]},"spec":{"volumes":[{"name":"default-token-fw46g","secret":{"secretName":"default-token-fw46g","defaultMode":420}}],"containers":[{"name":"tomcat","image":"docker.io/tomcat","ports":[{"containerPort":8080,"protocol":"TCP"}],"resources":{},"volumeMounts":[{"name":"default-token-fw46g","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","nodeName":"ac-private-2","securityContext":{},"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"type","operator":"In","values":["node1"]}]}]}}},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0},"status":{"phase":"Running","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:43:18Z"},{"type":"Ready","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:43:56Z"},{"type":"ContainersReady","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:43:56Z"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:43:18Z"}],"hostIP":"192.168.1.19","podIP":"10.244.1.86","startTime":"2018-12-05T05:43:18Z","containerStatuses":[{"name":"tomcat","state":{"running":{"startedAt":"2018-12-05T05:43:56Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"docker.io/tomcat:latest","imageID":"docker-pullable://docker.io/tomcat@sha256:e394c2f94eee344300e68d7183f3f19d272316f9691b280ac0e3911ea610e590","containerID":"docker://1b5cc80c30d58942d1e6431a156f3a58cd00293dcac0025ec6fc84f474d26050"}],"qosClass":"BestEffort"}}]}

获取某个Pod对象的信息:

api/v1/namespaces/default/pods/centos-ssh

{"kind":"Pod","apiVersion":"v1","metadata":{"name":"centos-ssh","namespace":"default","selfLink":"/api/v1/namespaces/default/pods/centos-ssh","uid":"79ebcd22-f84e-11e8-953c-a0a33bc4c0eb","resourceVersion":"843562","creationTimestamp":"2018-12-05T05:27:37Z","labels":{"name":"centos-ssh"}},"spec":{"volumes":[{"name":"data","hostPath":{"path":"/dev/sdk","type":""}},{"name":"default-token-fw46g","secret":{"secretName":"default-token-fw46g","defaultMode":420}}],"containers":[{"name":"centos-ssh","image":"docker.io/chenwenkai123456/centos-ssh:v1","command":["/usr/sbin/sshd","-D"],"ports":[{"hostPort":30015,"containerPort":22,"protocol":"TCP"}],"resources":{"limits":{"cpu":"4","memory":"8Gi"},"requests":{"cpu":"2","memory":"4Gi"}},"volumeMounts":[{"name":"data","mountPath":"/data"},{"name":"default-token-fw46g","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","nodeName":"xjs-dn04","securityContext":{},"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"type","operator":"In","values":["node4"]}]}]}}},"schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0},"status":{"phase":"Running","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:27:37Z"},{"type":"Ready","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:27:40Z"},{"type":"ContainersReady","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:27:40Z"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2018-12-05T05:27:37Z"}],"hostIP":"192.168.1.16","podIP":"10.244.4.21","startTime":"2018-12-05T05:27:37Z","containerStatuses":[{"name":"centos-ssh","state":{"running":{"startedAt":"2018-12-05T05:27:39Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"docker.io/chenwenkai123456/centos-ssh:v1","imageID":"docker-pullable://docker.io/chenwenkai123456/centos-ssh@sha256:ae6b8990ff39d54179443faace89fb2f26605bc76e56d435d2f804da099d7f83","containerID":"docker://6feaa58048bc482ce7e08b4344adae6acec2bd6bcacc563c6140ce26e295e17a"}],"qosClass":"Burstable"}}

获取所有Node物理节点列表:

api/v1/nodes

{"kind":"NodeList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/nodes","resourceVersion":"857998"},"items":[{"metadata":{"name":"ac-private-0","selfLink":"/api/v1/nodes/ac-private-0","uid":"7f4e158c-f399-11e8-953c-a0a33bc4c0eb","resourceVersion":"857991","creationTimestamp":"2018-11-29T05:42:02Z","labels":{"beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/os":"linux","kubernetes.io/hostname":"ac-private-0","type":"node2"},"annotations":{"flannel.alpha.coreos.com/backend-data":"{\"VtepMAC\":\"ea:fa:d4:6d:e1:e3\"}","flannel.alpha.coreos.com/backend-type":"vxlan","flannel.alpha.coreos.com/kube-subnet-manager":"true","flannel.alpha.coreos.com/public-ip":"192.168.1.18","kubeadm.alpha.kubernetes.io/cri-socket":"/var/run/dockershim.sock","node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"}},"spec":{"podCIDR":"10.244.2.0/24"},"status":{"capacity":{"cpu":"32","ephemeral-storage":"211338860Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131455684Ki","pods":"110"},"allocatable":{"cpu":"32","ephemeral-storage":"194769893054","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131353284Ki","pods":"110"},"conditions":[{"type":"OutOfDisk","status":"False","lastHeartbeatTime":"2018-12-05T07:57:19Z","lastTransitionTime":"2018-11-29T05:55:48Z","reason":"KubeletHasSufficientDisk","message":"kubelet has sufficient disk space available"},{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:19Z","lastTransitionTime":"2018-11-29T05:55:48Z","reason":"KubeletHasSufficientMemory","message":"kubelet has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:19Z","lastTransitionTime":"2018-11-29T05:55:48Z","reason":"KubeletHasNoDiskPressure","message":"kubelet has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:19Z","lastTransitionTime":"2018-11-29T05:42:02Z","reason":"KubeletHasSufficientPID","message":"kubelet has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2018-12-05T07:57:19Z","lastTransitionTime":"2018-11-29T05:55:48Z","reason":"KubeletReady","message":"kubelet is posting ready status"}],"addresses":[{"type":"InternalIP","address":"192.168.1.18"},{"type":"Hostname","address":"ac-private-0"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"802b88242a474039b190efc9ce1e95c0","systemUUID":"F65FD9B1-2C7C-E711-8E6A-BC3F8F8906EF","bootID":"bd8e7ee1-4be5-4d22-8d99-9eeb2845ea3c","kernelVersion":"3.10.0-327.el7.x86_64","osImage":"CentOS Linux 7 (Core)","containerRuntimeVersion":"docker://1.13.1","kubeletVersion":"v1.12.3","kubeProxyVersion":"v1.12.3","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["docker.io/tomcat@sha256:e394c2f94eee344300e68d7183f3f19d272316f9691b280ac0e3911ea610e590","docker.io/tomcat:latest"],"sizeBytes":462725827},{"names":["docker.io/chenwenkai123456/centos-ssh@sha256:ae6b8990ff39d54179443faace89fb2f26605bc76e56d435d2f804da099d7f83","docker.io/chenwenkai123456/centos-ssh:v1"],"sizeBytes":305338283},{"names":["k8s.gcr.io/kube-apiserver:v1.12.0-rc.1"],"sizeBytes":193937288},{"names":["k8s.gcr.io/etcd:3.2.24"],"sizeBytes":193214599},{"names":["k8s.gcr.io/kube-controller-manager:v1.12.0-rc.1"],"sizeBytes":164993346},{"names":["k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.0"],"sizeBytes":122460923},{"names":["k8s.gcr.io/kube-proxy:v1.12.0-rc.1"],"sizeBytes":96583047},{"names":["k8s.gcr.io/kube-scheduler:v1.12.0-rc.1"],"sizeBytes":58295858},{"names":["quay.io/coreos/flannel@sha256:056cf57fd3bbe7264c0be1a3b34ec2e289b33e51c70f332f4e88aa83970ad891","quay.io/coreos/flannel:v0.9.1-amd64"],"sizeBytes":51338831},{"names":["docker.io/keveon/k8s-dns-kube-dns-amd64@sha256:6d8e0da4fb46e9ea2034a3f4cab0e095618a2ead78720c12e791342738e5f85d","docker.io/keveon/k8s-dns-kube-dns-amd64:1.14.8"],"sizeBytes":50456751},{"names":["docker.io/keveon/k8s-dns-sidecar-amd64@sha256:23df717980b4aa08d2da6c4cfa327f1b730d92ec9cf740959d2d5911830d82fb","docker.io/keveon/k8s-dns-sidecar-amd64:1.14.8"],"sizeBytes":42210862},{"names":["docker.io/keveon/k8s-dns-dnsmasq-nanny-amd64@sha256:93c827f018cf3322f1ff2aa80324a0306048b0a69bc274e423071fb0d2d29d8b","docker.io/keveon/k8s-dns-dnsmasq-nanny-amd64:1.14.8"],"sizeBytes":40951779},{"names":["k8s.gcr.io/coredns:1.2.2"],"sizeBytes":39220458},{"names":["docker.io/busybox@sha256:2a03a6059f21e150ae84b0973863609494aad70f0a80eaeb64bddd8d92465812","docker.io/busybox:latest"],"sizeBytes":1154353},{"names":["k8s.gcr.io/pause:3.1"],"sizeBytes":742472}]}},{"metadata":{"name":"ac-private-1","selfLink":"/api/v1/nodes/ac-private-1","uid":"af3aa33b-f385-11e8-953c-a0a33bc4c0eb","resourceVersion":"857988","creationTimestamp":"2018-11-29T03:20:13Z","labels":{"beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/os":"linux","kubernetes.io/hostname":"ac-private-1","node-role.kubernetes.io/master":"","type":"master"},"annotations":{"flannel.alpha.coreos.com/backend-data":"{\"VtepMAC\":\"22:67:2b:9d:c5:46\"}","flannel.alpha.coreos.com/backend-type":"vxlan","flannel.alpha.coreos.com/kube-subnet-manager":"true","flannel.alpha.coreos.com/public-ip":"192.168.1.15","kubeadm.alpha.kubernetes.io/cri-socket":"/var/run/dockershim.sock","node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"}},"spec":{"podCIDR":"10.244.0.0/24","taints":[{"key":"node-role.kubernetes.io/master","effect":"NoSchedule"}]},"status":{"capacity":{"cpu":"32","ephemeral-storage":"211338860Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131455684Ki","pods":"110"},"allocatable":{"cpu":"32","ephemeral-storage":"194769893054","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131353284Ki","pods":"110"},"conditions":[{"type":"OutOfDisk","status":"False","lastHeartbeatTime":"2018-12-05T07:57:15Z","lastTransitionTime":"2018-11-29T03:20:03Z","reason":"KubeletHasSufficientDisk","message":"kubelet has sufficient disk space available"},{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:15Z","lastTransitionTime":"2018-11-29T03:20:03Z","reason":"KubeletHasSufficientMemory","message":"kubelet has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:15Z","lastTransitionTime":"2018-11-29T03:20:03Z","reason":"KubeletHasNoDiskPressure","message":"kubelet has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:15Z","lastTransitionTime":"2018-11-29T03:20:03Z","reason":"KubeletHasSufficientPID","message":"kubelet has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2018-12-05T07:57:15Z","lastTransitionTime":"2018-11-29T03:32:23Z","reason":"KubeletReady","message":"kubelet is posting ready status"}],"addresses":[{"type":"InternalIP","address":"192.168.1.15"},{"type":"Hostname","address":"ac-private-1"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"b2df1d64f0744a5e8296ca5dac633f5d","systemUUID":"68BCF705-2D7C-E711-8CB0-BC3F8F8905AE","bootID":"7fe0bed5-dc91-4a68-bc6f-225b5970cdae","kernelVersion":"3.10.0-327.el7.x86_64","osImage":"CentOS Linux 7 (Core)","containerRuntimeVersion":"docker://1.13.1","kubeletVersion":"v1.12.2","kubeProxyVersion":"v1.12.2","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["k8s.gcr.io/kube-apiserver:v1.12.0-rc.1"],"sizeBytes":193937288},{"names":["k8s.gcr.io/etcd:3.2.24"],"sizeBytes":193214599},{"names":["k8s.gcr.io/kube-controller-manager:v1.12.0-rc.1"],"sizeBytes":164993346},{"names":["k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.0"],"sizeBytes":122460923},{"names":["k8s.gcr.io/kube-proxy:v1.12.0-rc.1"],"sizeBytes":96583047},{"names":["k8s.gcr.io/kube-scheduler:v1.12.0-rc.1"],"sizeBytes":58295858},{"names":["quay.io/coreos/flannel@sha256:056cf57fd3bbe7264c0be1a3b34ec2e289b33e51c70f332f4e88aa83970ad891","quay.io/coreos/flannel:v0.9.1-amd64"],"sizeBytes":51338831},{"names":["k8s.gcr.io/k8s-dns-kube-dns-amd64:1.14.8"],"sizeBytes":50456751},{"names":["k8s.gcr.io/k8s-dns-sidecar-amd64:1.14.8"],"sizeBytes":42210862},{"names":["k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64:1.14.8"],"sizeBytes":40951779},{"names":["k8s.gcr.io/coredns:1.2.2"],"sizeBytes":39220458},{"names":["k8s.gcr.io/pause:3.1"],"sizeBytes":742472}]}},{"metadata":{"name":"ac-private-2","selfLink":"/api/v1/nodes/ac-private-2","uid":"63a10798-f396-11e8-953c-a0a33bc4c0eb","resourceVersion":"857983","creationTimestamp":"2018-11-29T05:19:47Z","labels":{"beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/os":"linux","kubernetes.io/hostname":"ac-private-2","type":"node1"},"annotations":{"flannel.alpha.coreos.com/backend-data":"{\"VtepMAC\":\"36:00:06:6e:25:32\"}","flannel.alpha.coreos.com/backend-type":"vxlan","flannel.alpha.coreos.com/kube-subnet-manager":"true","flannel.alpha.coreos.com/public-ip":"192.168.1.19","kubeadm.alpha.kubernetes.io/cri-socket":"/var/run/dockershim.sock","node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"}},"spec":{"podCIDR":"10.244.1.0/24"},"status":{"capacity":{"cpu":"32","ephemeral-storage":"211338860Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131455684Ki","pods":"110"},"allocatable":{"cpu":"32","ephemeral-storage":"194769893054","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131353284Ki","pods":"110"},"conditions":[{"type":"OutOfDisk","status":"False","lastHeartbeatTime":"2018-12-05T07:57:14Z","lastTransitionTime":"2018-11-29T05:19:47Z","reason":"KubeletHasSufficientDisk","message":"kubelet has sufficient disk space available"},{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:14Z","lastTransitionTime":"2018-11-29T05:19:47Z","reason":"KubeletHasSufficientMemory","message":"kubelet has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:14Z","lastTransitionTime":"2018-11-29T05:19:47Z","reason":"KubeletHasNoDiskPressure","message":"kubelet has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:14Z","lastTransitionTime":"2018-11-29T05:19:47Z","reason":"KubeletHasSufficientPID","message":"kubelet has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2018-12-05T07:57:14Z","lastTransitionTime":"2018-11-29T05:19:47Z","reason":"KubeletReady","message":"kubelet is posting ready status"}],"addresses":[{"type":"InternalIP","address":"192.168.1.19"},{"type":"Hostname","address":"ac-private-2"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"68c868b5739149b0bd014cd97cf7342f","systemUUID":"EEAFC7F8-2C7C-E711-B736-BC3F8F8906B3","bootID":"1bf420f2-b895-4130-9f9c-4c6577bc63f5","kernelVersion":"3.10.0-327.el7.x86_64","osImage":"CentOS Linux 7 (Core)","containerRuntimeVersion":"docker://1.13.1","kubeletVersion":"v1.12.2","kubeProxyVersion":"v1.12.2","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["docker.io/zerosre/kubernetes-heapster-canary@sha256:5eab4ad3d6fb0f4e97fbc3525b5feab3f93f900f63574e4e76a51105d186c4ef","docker.io/zerosre/kubernetes-heapster-canary:latest"],"sizeBytes":971277014},{"names":["docker.io/tomcat@sha256:e394c2f94eee344300e68d7183f3f19d272316f9691b280ac0e3911ea610e590","docker.io/tomcat:latest"],"sizeBytes":462725827},{"names":["docker.io/zerosre/gcr.io-google_containers-heapster_grafana-v3.1.1@sha256:94dfb1fc71792cf3dd8277ac60f306f4b54ff2c6c3996f1fd5bd93439671db5b","docker.io/zerosre/gcr.io-google_containers-heapster_grafana-v3.1.1:latest"],"sizeBytes":279315095},{"names":["docker.io/kubernetes/heapster@sha256:db8dc92b04f8818a30a4655bfc42e3f4eaca5157bcbfa3d0b834d196762d1926","docker.io/kubernetes/heapster:v0.10.0"],"sizeBytes":211314293},{"names":["k8s.gcr.io/kube-apiserver:v1.12.0-rc.1"],"sizeBytes":193937288},{"names":["k8s.gcr.io/etcd:3.2.24"],"sizeBytes":193214599},{"names":["k8s.gcr.io/kube-controller-manager:v1.12.0-rc.1"],"sizeBytes":164993346},{"names":["k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.0"],"sizeBytes":122460923},{"names":["k8s.gcr.io/kube-proxy:v1.12.0-rc.1"],"sizeBytes":96583047},{"names":["k8s.gcr.io/kube-scheduler:v1.12.0-rc.1"],"sizeBytes":58295858},{"names":["quay.io/coreos/flannel@sha256:056cf57fd3bbe7264c0be1a3b34ec2e289b33e51c70f332f4e88aa83970ad891","quay.io/coreos/flannel:v0.9.1-amd64"],"sizeBytes":51338831},{"names":["k8s.gcr.io/k8s-dns-kube-dns-amd64:1.14.8"],"sizeBytes":50456751},{"names":["k8s.gcr.io/k8s-dns-sidecar-amd64:1.14.8"],"sizeBytes":42210862},{"names":["k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64:1.14.8"],"sizeBytes":40951779},{"names":["k8s.gcr.io/coredns:1.2.2"],"sizeBytes":39220458},{"names":["k8s.gcr.io/heapster-influxdb-amd64:v1.3.3"],"sizeBytes":11585302},{"names":["docker.io/busybox@sha256:2a03a6059f21e150ae84b0973863609494aad70f0a80eaeb64bddd8d92465812","docker.io/busybox:latest"],"sizeBytes":1154353},{"names":["k8s.gcr.io/pause:3.1"],"sizeBytes":742472}]}},{"metadata":{"name":"xjs-dn02","selfLink":"/api/v1/nodes/xjs-dn02","uid":"0643ac8c-f3a0-11e8-953c-a0a33bc4c0eb","resourceVersion":"857984","creationTimestamp":"2018-11-29T06:28:46Z","labels":{"beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/os":"linux","kubernetes.io/hostname":"xjs-dn02","type":"node3"},"annotations":{"flannel.alpha.coreos.com/backend-data":"{\"VtepMAC\":\"c2:88:2e:59:da:47\"}","flannel.alpha.coreos.com/backend-type":"vxlan","flannel.alpha.coreos.com/kube-subnet-manager":"true","flannel.alpha.coreos.com/public-ip":"192.168.1.14","kubeadm.alpha.kubernetes.io/cri-socket":"/var/run/dockershim.sock","node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"}},"spec":{"podCIDR":"10.244.3.0/24"},"status":{"capacity":{"cpu":"32","ephemeral-storage":"211338860Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131455684Ki","pods":"110"},"allocatable":{"cpu":"32","ephemeral-storage":"194769893054","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131353284Ki","pods":"110"},"conditions":[{"type":"OutOfDisk","status":"False","lastHeartbeatTime":"2018-12-05T07:57:14Z","lastTransitionTime":"2018-11-29T06:28:46Z","reason":"KubeletHasSufficientDisk","message":"kubelet has sufficient disk space available"},{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:14Z","lastTransitionTime":"2018-11-29T06:28:46Z","reason":"KubeletHasSufficientMemory","message":"kubelet has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:14Z","lastTransitionTime":"2018-11-29T06:28:46Z","reason":"KubeletHasNoDiskPressure","message":"kubelet has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:14Z","lastTransitionTime":"2018-11-29T06:28:46Z","reason":"KubeletHasSufficientPID","message":"kubelet has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2018-12-05T07:57:14Z","lastTransitionTime":"2018-11-29T06:28:46Z","reason":"KubeletReady","message":"kubelet is posting ready status"}],"addresses":[{"type":"InternalIP","address":"192.168.1.14"},{"type":"Hostname","address":"xjs-dn02"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"a5a773f762db43c4ab3296e99cdcaa1d","systemUUID":"74D10CDA-2C7C-E711-903E-BC3F8F8905AB","bootID":"78410d78-b362-4f5b-a77c-2e3799dc6fbd","kernelVersion":"3.10.0-327.el7.x86_64","osImage":"CentOS Linux 7 (Core)","containerRuntimeVersion":"docker://1.13.1","kubeletVersion":"v1.12.3","kubeProxyVersion":"v1.12.3","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["docker.io/chenwenkai123456/centos-ssh@sha256:ae6b8990ff39d54179443faace89fb2f26605bc76e56d435d2f804da099d7f83","docker.io/chenwenkai123456/centos-ssh:v1"],"sizeBytes":305338283},{"names":["k8s.gcr.io/kube-apiserver:v1.12.0-rc.1"],"sizeBytes":193937288},{"names":["k8s.gcr.io/etcd:3.2.24"],"sizeBytes":193214599},{"names":["k8s.gcr.io/kube-controller-manager:v1.12.0-rc.1"],"sizeBytes":164993346},{"names":["k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.0"],"sizeBytes":122460923},{"names":["k8s.gcr.io/kube-proxy:v1.12.0-rc.1"],"sizeBytes":96583047},{"names":["k8s.gcr.io/kube-scheduler:v1.12.0-rc.1"],"sizeBytes":58295858},{"names":["quay.io/coreos/flannel@sha256:056cf57fd3bbe7264c0be1a3b34ec2e289b33e51c70f332f4e88aa83970ad891","quay.io/coreos/flannel:v0.9.1-amd64"],"sizeBytes":51338831},{"names":["docker.io/keveon/k8s-dns-kube-dns-amd64@sha256:6d8e0da4fb46e9ea2034a3f4cab0e095618a2ead78720c12e791342738e5f85d","docker.io/keveon/k8s-dns-kube-dns-amd64:1.14.8"],"sizeBytes":50456751},{"names":["docker.io/keveon/k8s-dns-sidecar-amd64@sha256:23df717980b4aa08d2da6c4cfa327f1b730d92ec9cf740959d2d5911830d82fb","docker.io/keveon/k8s-dns-sidecar-amd64:1.14.8"],"sizeBytes":42210862},{"names":["docker.io/keveon/k8s-dns-dnsmasq-nanny-amd64@sha256:93c827f018cf3322f1ff2aa80324a0306048b0a69bc274e423071fb0d2d29d8b","docker.io/keveon/k8s-dns-dnsmasq-nanny-amd64:1.14.8"],"sizeBytes":40951779},{"names":["k8s.gcr.io/coredns:1.2.2"],"sizeBytes":39220458},{"names":["k8s.gcr.io/pause:3.1"],"sizeBytes":742472}]}},{"metadata":{"name":"xjs-dn04","selfLink":"/api/v1/nodes/xjs-dn04","uid":"6b3bef8a-f3a0-11e8-953c-a0a33bc4c0eb","resourceVersion":"857992","creationTimestamp":"2018-11-29T06:31:35Z","labels":{"beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/os":"linux","kubernetes.io/hostname":"xjs-dn04","type":"node4"},"annotations":{"flannel.alpha.coreos.com/backend-data":"{\"VtepMAC\":\"3a:8d:17:87:97:12\"}","flannel.alpha.coreos.com/backend-type":"vxlan","flannel.alpha.coreos.com/kube-subnet-manager":"true","flannel.alpha.coreos.com/public-ip":"192.168.1.16","kubeadm.alpha.kubernetes.io/cri-socket":"/var/run/dockershim.sock","node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"}},"spec":{"podCIDR":"10.244.4.0/24"},"status":{"capacity":{"cpu":"32","ephemeral-storage":"211338860Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131455684Ki","pods":"110"},"allocatable":{"cpu":"32","ephemeral-storage":"194769893054","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131353284Ki","pods":"110"},"conditions":[{"type":"OutOfDisk","status":"False","lastHeartbeatTime":"2018-12-05T07:57:19Z","lastTransitionTime":"2018-11-29T06:31:35Z","reason":"KubeletHasSufficientDisk","message":"kubelet has sufficient disk space available"},{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:19Z","lastTransitionTime":"2018-11-29T06:31:35Z","reason":"KubeletHasSufficientMemory","message":"kubelet has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:19Z","lastTransitionTime":"2018-11-29T06:31:35Z","reason":"KubeletHasNoDiskPressure","message":"kubelet has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:57:19Z","lastTransitionTime":"2018-11-29T06:31:35Z","reason":"KubeletHasSufficientPID","message":"kubelet has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2018-12-05T07:57:19Z","lastTransitionTime":"2018-11-29T06:31:35Z","reason":"KubeletReady","message":"kubelet is posting ready status"}],"addresses":[{"type":"InternalIP","address":"192.168.1.16"},{"type":"Hostname","address":"xjs-dn04"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"b993a6bb441c48d395be6d805102b997","systemUUID":"7CD61657-2A7C-E711-9805-BC3F8F8905B1","bootID":"0c53ce4d-eda0-43e6-9e4c-0cd81a52d866","kernelVersion":"3.10.0-327.el7.x86_64","osImage":"CentOS Linux 7 (Core)","containerRuntimeVersion":"docker://1.13.1","kubeletVersion":"v1.12.3","kubeProxyVersion":"v1.12.3","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["docker.io/kinogmt/centos-ssh@sha256:acdf7798259f859a8e713f2f88511eef5e0f94cb2d2dec078a1fe169a8aacf63","docker.io/kinogmt/centos-ssh:latest"],"sizeBytes":773130464},{"names":["docker.io/chenwenkai123456/centos-ssh@sha256:ae6b8990ff39d54179443faace89fb2f26605bc76e56d435d2f804da099d7f83","docker.io/chenwenkai123456/centos-ssh:v1"],"sizeBytes":305338283},{"names":["docker.io/zerosre/gcr.io-google_containers-heapster_grafana-v3.1.1@sha256:94dfb1fc71792cf3dd8277ac60f306f4b54ff2c6c3996f1fd5bd93439671db5b","docker.io/zerosre/gcr.io-google_containers-heapster_grafana-v3.1.1:latest"],"sizeBytes":279315095},{"names":["docker.io/centos@sha256:67dad89757a55bfdfabec8abd0e22f8c7c12a1856514726470228063ed86593b","docker.io/centos:latest"],"sizeBytes":200375261},{"names":["k8s.gcr.io/kube-apiserver:v1.12.0-rc.1"],"sizeBytes":193937288},{"names":["k8s.gcr.io/etcd:3.2.24"],"sizeBytes":193214599},{"names":["k8s.gcr.io/kube-controller-manager:v1.12.0-rc.1"],"sizeBytes":164993346},{"names":["k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.0"],"sizeBytes":122460923},{"names":["k8s.gcr.io/kube-proxy:v1.12.0-rc.1"],"sizeBytes":96583047},{"names":["k8s.gcr.io/kube-scheduler:v1.12.0-rc.1"],"sizeBytes":58295858},{"names":["quay.io/coreos/flannel@sha256:056cf57fd3bbe7264c0be1a3b34ec2e289b33e51c70f332f4e88aa83970ad891","quay.io/coreos/flannel:v0.9.1-amd64"],"sizeBytes":51338831},{"names":["docker.io/keveon/k8s-dns-kube-dns-amd64@sha256:6d8e0da4fb46e9ea2034a3f4cab0e095618a2ead78720c12e791342738e5f85d","docker.io/keveon/k8s-dns-kube-dns-amd64:1.14.8"],"sizeBytes":50456751},{"names":["docker.io/keveon/k8s-dns-sidecar-amd64@sha256:23df717980b4aa08d2da6c4cfa327f1b730d92ec9cf740959d2d5911830d82fb","docker.io/keveon/k8s-dns-sidecar-amd64:1.14.8"],"sizeBytes":42210862},{"names":["docker.io/keveon/k8s-dns-dnsmasq-nanny-amd64@sha256:93c827f018cf3322f1ff2aa80324a0306048b0a69bc274e423071fb0d2d29d8b","docker.io/keveon/k8s-dns-dnsmasq-nanny-amd64:1.14.8"],"sizeBytes":40951779},{"names":["k8s.gcr.io/coredns:1.2.2"],"sizeBytes":39220458},{"names":["k8s.gcr.io/pause:3.1"],"sizeBytes":742472}]}}]}

获取某个Node节点物理列表:

api/v1/nodes/ac-private-0

{"kind":"Node","apiVersion":"v1","metadata":{"name":"ac-private-0","selfLink":"/api/v1/nodes/ac-private-0","uid":"7f4e158c-f399-11e8-953c-a0a33bc4c0eb","resourceVersion":"858215","creationTimestamp":"2018-11-29T05:42:02Z","labels":{"beta.kubernetes.io/arch":"amd64","beta.kubernetes.io/os":"linux","kubernetes.io/hostname":"ac-private-0","type":"node2"},"annotations":{"flannel.alpha.coreos.com/backend-data":"{\"VtepMAC\":\"ea:fa:d4:6d:e1:e3\"}","flannel.alpha.coreos.com/backend-type":"vxlan","flannel.alpha.coreos.com/kube-subnet-manager":"true","flannel.alpha.coreos.com/public-ip":"192.168.1.18","kubeadm.alpha.kubernetes.io/cri-socket":"/var/run/dockershim.sock","node.alpha.kubernetes.io/ttl":"0","volumes.kubernetes.io/controller-managed-attach-detach":"true"}},"spec":{"podCIDR":"10.244.2.0/24"},"status":{"capacity":{"cpu":"32","ephemeral-storage":"211338860Ki","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131455684Ki","pods":"110"},"allocatable":{"cpu":"32","ephemeral-storage":"194769893054","hugepages-1Gi":"0","hugepages-2Mi":"0","memory":"131353284Ki","pods":"110"},"conditions":[{"type":"OutOfDisk","status":"False","lastHeartbeatTime":"2018-12-05T07:59:39Z","lastTransitionTime":"2018-11-29T05:55:48Z","reason":"KubeletHasSufficientDisk","message":"kubelet has sufficient disk space available"},{"type":"MemoryPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:59:39Z","lastTransitionTime":"2018-11-29T05:55:48Z","reason":"KubeletHasSufficientMemory","message":"kubelet has sufficient memory available"},{"type":"DiskPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:59:39Z","lastTransitionTime":"2018-11-29T05:55:48Z","reason":"KubeletHasNoDiskPressure","message":"kubelet has no disk pressure"},{"type":"PIDPressure","status":"False","lastHeartbeatTime":"2018-12-05T07:59:39Z","lastTransitionTime":"2018-11-29T05:42:02Z","reason":"KubeletHasSufficientPID","message":"kubelet has sufficient PID available"},{"type":"Ready","status":"True","lastHeartbeatTime":"2018-12-05T07:59:39Z","lastTransitionTime":"2018-11-29T05:55:48Z","reason":"KubeletReady","message":"kubelet is posting ready status"}],"addresses":[{"type":"InternalIP","address":"192.168.1.18"},{"type":"Hostname","address":"ac-private-0"}],"daemonEndpoints":{"kubeletEndpoint":{"Port":10250}},"nodeInfo":{"machineID":"802b88242a474039b190efc9ce1e95c0","systemUUID":"F65FD9B1-2C7C-E711-8E6A-BC3F8F8906EF","bootID":"bd8e7ee1-4be5-4d22-8d99-9eeb2845ea3c","kernelVersion":"3.10.0-327.el7.x86_64","osImage":"CentOS Linux 7 (Core)","containerRuntimeVersion":"docker://1.13.1","kubeletVersion":"v1.12.3","kubeProxyVersion":"v1.12.3","operatingSystem":"linux","architecture":"amd64"},"images":[{"names":["docker.io/tomcat@sha256:e394c2f94eee344300e68d7183f3f19d272316f9691b280ac0e3911ea610e590","docker.io/tomcat:latest"],"sizeBytes":462725827},{"names":["docker.io/chenwenkai123456/centos-ssh@sha256:ae6b8990ff39d54179443faace89fb2f26605bc76e56d435d2f804da099d7f83","docker.io/chenwenkai123456/centos-ssh:v1"],"sizeBytes":305338283},{"names":["k8s.gcr.io/kube-apiserver:v1.12.0-rc.1"],"sizeBytes":193937288},{"names":["k8s.gcr.io/etcd:3.2.24"],"sizeBytes":193214599},{"names":["k8s.gcr.io/kube-controller-manager:v1.12.0-rc.1"],"sizeBytes":164993346},{"names":["k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.0"],"sizeBytes":122460923},{"names":["k8s.gcr.io/kube-proxy:v1.12.0-rc.1"],"sizeBytes":96583047},{"names":["k8s.gcr.io/kube-scheduler:v1.12.0-rc.1"],"sizeBytes":58295858},{"names":["quay.io/coreos/flannel@sha256:056cf57fd3bbe7264c0be1a3b34ec2e289b33e51c70f332f4e88aa83970ad891","quay.io/coreos/flannel:v0.9.1-amd64"],"sizeBytes":51338831},{"names":["docker.io/keveon/k8s-dns-kube-dns-amd64@sha256:6d8e0da4fb46e9ea2034a3f4cab0e095618a2ead78720c12e791342738e5f85d","docker.io/keveon/k8s-dns-kube-dns-amd64:1.14.8"],"sizeBytes":50456751},{"names":["docker.io/keveon/k8s-dns-sidecar-amd64@sha256:23df717980b4aa08d2da6c4cfa327f1b730d92ec9cf740959d2d5911830d82fb","docker.io/keveon/k8s-dns-sidecar-amd64:1.14.8"],"sizeBytes":42210862},{"names":["docker.io/keveon/k8s-dns-dnsmasq-nanny-amd64@sha256:93c827f018cf3322f1ff2aa80324a0306048b0a69bc274e423071fb0d2d29d8b","docker.io/keveon/k8s-dns-dnsmasq-nanny-amd64:1.14.8"],"sizeBytes":40951779},{"names":["k8s.gcr.io/coredns:1.2.2"],"sizeBytes":39220458},{"names":["docker.io/busybox@sha256:2a03a6059f21e150ae84b0973863609494aad70f0a80eaeb64bddd8d92465812","docker.io/busybox:latest"],"sizeBytes":1154353},{"names":["k8s.gcr.io/pause:3.1"],"sizeBytes":742472}]}}

可以获取到该物理节点的内存以及cpu资源信息。

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐