1 2 3 |
[root@docker1 scripts]# kubectl version Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.7", GitCommit:"095136c3078ccf887b9034b7ce598a0a1faff769", GitTreeState:"clean", BuildDate:"2017-07-05T16:51:56Z", GoVersion:"go1.7.6", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.7", GitCommit:"095136c3078ccf887b9034b7ce598a0a1faff769", GitTreeState:"clean", BuildDate:"2017-07-05T16:40:42Z", GoVersion:"go1.7.6", Compiler:"gc", Platform:"linux/amd64"} |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
[root@docker1 scripts]# kubectl get service -o wide NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR kubernetes 169.169.0.1 <none> 443/TCP 21h <none> [root@docker1 scripts]# kubectl get service -o yaml apiVersion: v1 items: - apiVersion: v1 kind: Service metadata: creationTimestamp: 2017-07-08T15:21:07Z labels: component: apiserver provider: kubernetes name: kubernetes namespace: default resourceVersion: "6" selfLink: /api/v1/namespaces/default/services/kubernetes uid: 10deaa9e-63f1-11e7-b416-000c29420d98 spec: clusterIP: 169.169.0.1 ports: - name: https port: 443 protocol: TCP targetPort: 6443 sessionAffinity: ClientIP type: ClusterIP status: loadBalancer: {} kind: List metadata: {} resourceVersion: "" selfLink: "" |
1 2 3 4 5 |
[root@docker1 scripts]# kubectl get namespaces NAME STATUS AGE default Active 21h kube-public Active 21h kube-system Active 21h |
1 2 3 4 |
[root@docker1 scripts]# kubectl cluster-info Kubernetes master is running at http://localhost:8080 To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
[root@docker1 scripts]# kubectl cluster-info dump { "selfLink": "/api/v1/nodes", "resourceVersion": "3986", "Items": [ { "name": "172.16.199.27", "selfLink": "/api/v1/nodes172.16.199.27", "uid": "0ab9842f-6480-11e7-ae06-000c29420d98", "resourceVersion": "3986", "creationTimestamp": "2017-07-09T08:24:35Z", "labels": { "beta.kubernetes.io/arch": "amd64", "beta.kubernetes.io/os": "linux", "kubernetes.io/hostname": "172.16.199.27" }, "annotations": { "node.alpha.kubernetes.io/ttl": "0", "volumes.kubernetes.io/controller-managed-attach-detach": "true" }, "Spec": { "PodCIDR": "", "ExternalID": "172.16.199.27", "ProviderID": "", "Unschedulable": false, "Taints": null }, "Status": { "Capacity": { "cpu": "2", "memory": "2032140Ki", "pods": "110" }, "Allocatable": { "cpu": "2", "memory": "1929740Ki", "pods": "110" }, "Phase": "", "Conditions": [ { "Type": "OutOfDisk", "Status": "False", "LastHeartbeatTime": "2017-07-09T12:48:05Z", "LastTransitionTime": "2017-07-09T08:24:35Z", "Reason": "KubeletHasSufficientDisk", "Message": "kubelet has sufficient disk space available" }, { "Type": "MemoryPressure", "Status": "False", "LastHeartbeatTime": "2017-07-09T12:48:05Z", "LastTransitionTime": "2017-07-09T08:24:35Z", "Reason": "KubeletHasSufficientMemory", "Message": "kubelet has sufficient memory available" }, { "Type": "DiskPressure", "Status": "False", "LastHeartbeatTime": "2017-07-09T12:48:05Z", "LastTransitionTime": "2017-07-09T08:24:35Z", "Reason": "KubeletHasNoDiskPressure", "Message": "kubelet has no disk pressure" }, { "Type": "Ready", "Status": "True", "LastHeartbeatTime": "2017-07-09T12:48:05Z", "LastTransitionTime": "2017-07-09T08:26:48Z", "Reason": "KubeletReady", "Message": "kubelet is posting ready status" } ], "Addresses": [ { "Type": "LegacyHostIP", "Address": "172.16.199.27" }, { "Type": "InternalIP", "Address": "172.16.199.27" }, { "Type": "Hostname", "Address": "172.16.199.27" } ], "DaemonEndpoints": { "KubeletEndpoint": { "Port": 10250 } }, "NodeInfo": { "MachineID": "0edb716e1cf347faa490b2a81c5e6dcd", "SystemUUID": "A89B4D56-77F4-B627-417C-F26AE2AE1179", "BootID": "030162c8-a2ff-4682-82cc-31cdb1b2d7b6", "KernelVersion": "3.10.0-514.21.2.el7.x86_64", "OSImage": "CentOS Linux 7 (Core)", "ContainerRuntimeVersion": "docker://Unknown", "KubeletVersion": "v1.6.7", "KubeProxyVersion": "v1.6.7", "OperatingSystem": "linux", "Architecture": "amd64" }, "Images": [ { "Names": [ "index.alauda.cn/georce/router:latest" ], "SizeBytes": 139067018 }, { "Names": [ "myf5/busybox-with-pipework-eth1:latest" ], "SizeBytes": 1110190 }, { "Names": [ "busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f", "busybox:latest" ], "SizeBytes": 1109996 } ], "VolumesInUse": null, "VolumesAttached": null } }, { "name": "172.16.199.37", "selfLink": "/api/v1/nodes172.16.199.37", "uid": "b418836d-6481-11e7-ae06-000c29420d98", "resourceVersion": "3985", "creationTimestamp": "2017-07-09T08:36:29Z", "labels": { "beta.kubernetes.io/arch": "amd64", "beta.kubernetes.io/os": "linux", "kubernetes.io/hostname": "172.16.199.37" }, "annotations": { "node.alpha.kubernetes.io/ttl": "0", "volumes.kubernetes.io/controller-managed-attach-detach": "true" }, "Spec": { "PodCIDR": "", "ExternalID": "172.16.199.37", "ProviderID": "", "Unschedulable": false, "Taints": null }, "Status": { "Capacity": { "cpu": "2", "memory": "2032140Ki", "pods": "110" }, "Allocatable": { "cpu": "2", "memory": "1929740Ki", "pods": "110" }, "Phase": "", "Conditions": [ { "Type": "OutOfDisk", "Status": "False", "LastHeartbeatTime": "2017-07-09T12:48:05Z", "LastTransitionTime": "2017-07-09T08:36:29Z", "Reason": "KubeletHasSufficientDisk", "Message": "kubelet has sufficient disk space available" }, { "Type": "MemoryPressure", "Status": "False", "LastHeartbeatTime": "2017-07-09T12:48:05Z", "LastTransitionTime": "2017-07-09T08:36:29Z", "Reason": "KubeletHasSufficientMemory", "Message": "kubelet has sufficient memory available" }, { "Type": "DiskPressure", "Status": "False", "LastHeartbeatTime": "2017-07-09T12:48:05Z", "LastTransitionTime": "2017-07-09T08:36:29Z", "Reason": "KubeletHasNoDiskPressure", "Message": "kubelet has no disk pressure" }, { "Type": "Ready", "Status": "True", "LastHeartbeatTime": "2017-07-09T12:48:05Z", "LastTransitionTime": "2017-07-09T08:36:39Z", "Reason": "KubeletReady", "Message": "kubelet is posting ready status" } ], "Addresses": [ { "Type": "LegacyHostIP", "Address": "172.16.199.37" }, { "Type": "InternalIP", "Address": "172.16.199.37" }, { "Type": "Hostname", "Address": "172.16.199.37" } ], "DaemonEndpoints": { "KubeletEndpoint": { "Port": 10250 } }, "NodeInfo": { "MachineID": "0edb716e1cf347faa490b2a81c5e6dcd", "SystemUUID": "368B4D56-5DF0-42C8-CAED-C81A127DF5AA", "BootID": "15180f8d-5783-495f-a564-15170bcd1df9", "KernelVersion": "3.10.0-514.21.2.el7.x86_64", "OSImage": "CentOS Linux 7 (Core)", "ContainerRuntimeVersion": "docker://Unknown", "KubeletVersion": "v1.6.7", "KubeProxyVersion": "v1.6.7", "OperatingSystem": "linux", "Architecture": "amd64" }, "Images": [ { "Names": [ "busybox@sha256:be3c11fdba7cfe299214e46edc642e09514dbb9bbefcd0d3836c05a1e0cd0642", "busybox:latest" ], "SizeBytes": 1106304 } ], "VolumesInUse": null, "VolumesAttached": null } } ] } { "selfLink": "/api/v1/namespaces/kube-system/events", "resourceVersion": "3986", "Items": [] } { "selfLink": "/api/v1/namespaces/kube-system/replicationcontrollers", "resourceVersion": "3986", "Items": [] } { "selfLink": "/api/v1/namespaces/kube-system/services", "resourceVersion": "3986", "Items": [] } { "selfLink": "/apis/extensions/v1beta1/namespaces/kube-system/daemonsets", "resourceVersion": "3986", "Items": [] } { "selfLink": "/apis/extensions/v1beta1/namespaces/kube-system/deployments", "resourceVersion": "3986", "Items": [] } { "selfLink": "/apis/extensions/v1beta1/namespaces/kube-system/replicasets", "resourceVersion": "3986", "Items": [] } { "selfLink": "/api/v1/namespaces/kube-system/pods", "resourceVersion": "3986", "Items": [] } { "selfLink": "/api/v1/namespaces/default/events", "resourceVersion": "3986", "Items": [] } { "selfLink": "/api/v1/namespaces/default/replicationcontrollers", "resourceVersion": "3986", "Items": [] } { "selfLink": "/api/v1/namespaces/default/services", "resourceVersion": "3986", "Items": [ { "name": "kubernetes", "namespace": "default", "selfLink": "/api/v1/namespaces/default/services/kubernetes", "uid": "10deaa9e-63f1-11e7-b416-000c29420d98", "resourceVersion": "6", "creationTimestamp": "2017-07-08T15:21:07Z", "labels": { "component": "apiserver", "provider": "kubernetes" }, "Spec": { "Type": "ClusterIP", "Ports": [ { "Name": "https", "Protocol": "TCP", "Port": 443, "TargetPort": 6443, "NodePort": 0 } ], "Selector": null, "ClusterIP": "169.169.0.1", "ExternalName": "", "ExternalIPs": null, "LoadBalancerIP": "", "SessionAffinity": "ClientIP", "LoadBalancerSourceRanges": null }, "Status": { "LoadBalancer": { "Ingress": null } } } ] } { "selfLink": "/apis/extensions/v1beta1/namespaces/default/daemonsets", "resourceVersion": "3986", "Items": [] } { "selfLink": "/apis/extensions/v1beta1/namespaces/default/deployments", "resourceVersion": "3986", "Items": [] } { "selfLink": "/apis/extensions/v1beta1/namespaces/default/replicasets", "resourceVersion": "3986", "Items": [] } { "selfLink": "/api/v1/namespaces/default/pods", "resourceVersion": "3986", "Items": [] } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@docker1 scripts]# kubectl api-versions apps/v1beta1 authentication.k8s.io/v1 authentication.k8s.io/v1beta1 authorization.k8s.io/v1 authorization.k8s.io/v1beta1 autoscaling/v1 batch/v1 certificates.k8s.io/v1beta1 extensions/v1beta1 policy/v1beta1 rbac.authorization.k8s.io/v1alpha1 rbac.authorization.k8s.io/v1beta1 settings.k8s.io/v1alpha1 storage.k8s.io/v1 storage.k8s.io/v1beta1 v1 |
1 2 3 4 |
[root@docker1 scripts]# kubectl get no -o wide NAME STATUS AGE VERSION EXTERNAL-IP OS-IMAGE KERNEL-VERSION 172.16.199.27 Ready 4h v1.6.7 <none> CentOS Linux 7 (Core) 3.10.0-514.21.2.el7.x86_64 172.16.199.37 Ready 4h v1.6.7 <none> CentOS Linux 7 (Core) 3.10.0-514.21.2.el7.x86_64 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
[root@docker1 scripts]# kubectl get no -o yaml apiVersion: v1 items: - apiVersion: v1 kind: Node metadata: annotations: node.alpha.kubernetes.io/ttl: "0" volumes.kubernetes.io/controller-managed-attach-detach: "true" creationTimestamp: 2017-07-09T08:24:35Z labels: beta.kubernetes.io/arch: amd64 beta.kubernetes.io/os: linux kubernetes.io/hostname: 172.16.199.27 name: 172.16.199.27 namespace: "" resourceVersion: "4051" selfLink: /api/v1/nodes172.16.199.27 uid: 0ab9842f-6480-11e7-ae06-000c29420d98 spec: externalID: 172.16.199.27 status: addresses: - address: 172.16.199.27 type: LegacyHostIP - address: 172.16.199.27 type: InternalIP - address: 172.16.199.27 type: Hostname allocatable: cpu: "2" memory: 1929740Ki pods: "110" capacity: cpu: "2" memory: 2032140Ki pods: "110" conditions: - lastHeartbeatTime: 2017-07-09T12:53:25Z lastTransitionTime: 2017-07-09T08:24:35Z message: kubelet has sufficient disk space available reason: KubeletHasSufficientDisk status: "False" type: OutOfDisk - lastHeartbeatTime: 2017-07-09T12:53:25Z lastTransitionTime: 2017-07-09T08:24:35Z message: kubelet has sufficient memory available reason: KubeletHasSufficientMemory status: "False" type: MemoryPressure - lastHeartbeatTime: 2017-07-09T12:53:25Z lastTransitionTime: 2017-07-09T08:24:35Z message: kubelet has no disk pressure reason: KubeletHasNoDiskPressure status: "False" type: DiskPressure - lastHeartbeatTime: 2017-07-09T12:53:25Z lastTransitionTime: 2017-07-09T08:26:48Z message: kubelet is posting ready status reason: KubeletReady status: "True" type: Ready daemonEndpoints: kubeletEndpoint: Port: 10250 images: - names: - index.alauda.cn/georce/router:latest sizeBytes: 139067018 - names: - myf5/busybox-with-pipework-eth1:latest sizeBytes: 1110190 - names: - busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f - busybox:latest sizeBytes: 1109996 nodeInfo: architecture: amd64 bootID: 030162c8-a2ff-4682-82cc-31cdb1b2d7b6 containerRuntimeVersion: docker://Unknown kernelVersion: 3.10.0-514.21.2.el7.x86_64 kubeProxyVersion: v1.6.7 kubeletVersion: v1.6.7 machineID: 0edb716e1cf347faa490b2a81c5e6dcd operatingSystem: linux osImage: CentOS Linux 7 (Core) systemUUID: A89B4D56-77F4-B627-417C-F26AE2AE1179 - apiVersion: v1 kind: Node metadata: annotations: node.alpha.kubernetes.io/ttl: "0" volumes.kubernetes.io/controller-managed-attach-detach: "true" creationTimestamp: 2017-07-09T08:36:29Z labels: beta.kubernetes.io/arch: amd64 beta.kubernetes.io/os: linux kubernetes.io/hostname: 172.16.199.37 name: 172.16.199.37 namespace: "" resourceVersion: "4050" selfLink: /api/v1/nodes172.16.199.37 uid: b418836d-6481-11e7-ae06-000c29420d98 spec: externalID: 172.16.199.37 status: addresses: - address: 172.16.199.37 type: LegacyHostIP - address: 172.16.199.37 type: InternalIP - address: 172.16.199.37 type: Hostname allocatable: cpu: "2" memory: 1929740Ki pods: "110" capacity: cpu: "2" memory: 2032140Ki pods: "110" conditions: - lastHeartbeatTime: 2017-07-09T12:53:25Z lastTransitionTime: 2017-07-09T08:36:29Z message: kubelet has sufficient disk space available reason: KubeletHasSufficientDisk status: "False" type: OutOfDisk - lastHeartbeatTime: 2017-07-09T12:53:25Z lastTransitionTime: 2017-07-09T08:36:29Z message: kubelet has sufficient memory available reason: KubeletHasSufficientMemory status: "False" type: MemoryPressure - lastHeartbeatTime: 2017-07-09T12:53:25Z lastTransitionTime: 2017-07-09T08:36:29Z message: kubelet has no disk pressure reason: KubeletHasNoDiskPressure status: "False" type: DiskPressure - lastHeartbeatTime: 2017-07-09T12:53:25Z lastTransitionTime: 2017-07-09T08:36:39Z message: kubelet is posting ready status reason: KubeletReady status: "True" type: Ready daemonEndpoints: kubeletEndpoint: Port: 10250 images: - names: - busybox@sha256:be3c11fdba7cfe299214e46edc642e09514dbb9bbefcd0d3836c05a1e0cd0642 - busybox:latest sizeBytes: 1106304 nodeInfo: architecture: amd64 bootID: 15180f8d-5783-495f-a564-15170bcd1df9 containerRuntimeVersion: docker://Unknown kernelVersion: 3.10.0-514.21.2.el7.x86_64 kubeProxyVersion: v1.6.7 kubeletVersion: v1.6.7 machineID: 0edb716e1cf347faa490b2a81c5e6dcd operatingSystem: linux osImage: CentOS Linux 7 (Core) systemUUID: 368B4D56-5DF0-42C8-CAED-C81A127DF5AA kind: List metadata: {} resourceVersion: "" selfLink: "" |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
[root@docker1 scripts]# kubectl describe nodes Name: 172.16.199.27 Role: Labels: beta.kubernetes.io/arch=amd64 beta.kubernetes.io/os=linux kubernetes.io/hostname=172.16.199.27 Annotations: node.alpha.kubernetes.io/ttl=0 volumes.kubernetes.io/controller-managed-attach-detach=true Taints: <none> CreationTimestamp: Sun, 09 Jul 2017 16:24:35 +0800 Phase: Conditions: Type Status LastHeartbeatTime LastTransitionTime Reason Message ---- ------ ----------------- ------------------ ------ ------- OutOfDisk False Sun, 09 Jul 2017 20:54:55 +0800 Sun, 09 Jul 2017 16:24:35 +0800 KubeletHasSufficientDisk kubelet has sufficient disk space available MemoryPressure False Sun, 09 Jul 2017 20:54:55 +0800 Sun, 09 Jul 2017 16:24:35 +0800 KubeletHasSufficientMemory kubelet has sufficient memory available DiskPressure False Sun, 09 Jul 2017 20:54:55 +0800 Sun, 09 Jul 2017 16:24:35 +0800 KubeletHasNoDiskPressure kubelet has no disk pressure Ready True Sun, 09 Jul 2017 20:54:55 +0800 Sun, 09 Jul 2017 16:26:48 +0800 KubeletReady kubelet is posting ready status Addresses: 172.16.199.27,172.16.199.27,172.16.199.27 Capacity: cpu: 2 memory: 2032140Ki pods: 110 Allocatable: cpu: 2 memory: 1929740Ki pods: 110 System Info: Machine ID: 0edb716e1cf347faa490b2a81c5e6dcd System UUID: A89B4D56-77F4-B627-417C-F26AE2AE1179 Boot ID: 030162c8-a2ff-4682-82cc-31cdb1b2d7b6 Kernel Version: 3.10.0-514.21.2.el7.x86_64 OS Image: CentOS Linux 7 (Core) Operating System: linux Architecture: amd64 Container Runtime Version: docker://Unknown Kubelet Version: v1.6.7 Kube-Proxy Version: v1.6.7 ExternalID: 172.16.199.27 Non-terminated Pods: (0 in total) Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits --------- ---- ------------ ---------- --------------- ------------- Allocated resources: (Total limits may be over 100 percent, i.e., overcommitted.) CPU Requests CPU Limits Memory Requests Memory Limits ------------ ---------- --------------- ------------- 0 (0%) 0 (0%) 0 (0%) 0 (0%) Events: <none> Name: 172.16.199.37 Role: Labels: beta.kubernetes.io/arch=amd64 beta.kubernetes.io/os=linux kubernetes.io/hostname=172.16.199.37 Annotations: node.alpha.kubernetes.io/ttl=0 volumes.kubernetes.io/controller-managed-attach-detach=true Taints: <none> CreationTimestamp: Sun, 09 Jul 2017 16:36:29 +0800 Phase: Conditions: Type Status LastHeartbeatTime LastTransitionTime Reason Message ---- ------ ----------------- ------------------ ------ ------- OutOfDisk False Sun, 09 Jul 2017 20:54:55 +0800 Sun, 09 Jul 2017 16:36:29 +0800 KubeletHasSufficientDisk kubelet has sufficient disk space available MemoryPressure False Sun, 09 Jul 2017 20:54:55 +0800 Sun, 09 Jul 2017 16:36:29 +0800 KubeletHasSufficientMemory kubelet has sufficient memory available DiskPressure False Sun, 09 Jul 2017 20:54:55 +0800 Sun, 09 Jul 2017 16:36:29 +0800 KubeletHasNoDiskPressure kubelet has no disk pressure Ready True Sun, 09 Jul 2017 20:54:55 +0800 Sun, 09 Jul 2017 16:36:39 +0800 KubeletReady kubelet is posting ready status Addresses: 172.16.199.37,172.16.199.37,172.16.199.37 Capacity: cpu: 2 memory: 2032140Ki pods: 110 Allocatable: cpu: 2 memory: 1929740Ki pods: 110 System Info: Machine ID: 0edb716e1cf347faa490b2a81c5e6dcd System UUID: 368B4D56-5DF0-42C8-CAED-C81A127DF5AA Boot ID: 15180f8d-5783-495f-a564-15170bcd1df9 Kernel Version: 3.10.0-514.21.2.el7.x86_64 OS Image: CentOS Linux 7 (Core) Operating System: linux Architecture: amd64 Container Runtime Version: docker://Unknown Kubelet Version: v1.6.7 Kube-Proxy Version: v1.6.7 ExternalID: 172.16.199.37 Non-terminated Pods: (0 in total) Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits --------- ---- ------------ ---------- --------------- ------------- Allocated resources: (Total limits may be over 100 percent, i.e., overcommitted.) CPU Requests CPU Limits Memory Requests Memory Limits ------------ ---------- --------------- ------------- 0 (0%) 0 (0%) 0 (0%) 0 (0%) Events: <none> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
[root@docker1 scripts]# curl http://localhost:8080/api/v1/nodes/172.16.199.27 { "kind": "Node", "apiVersion": "v1", "metadata": { "name": "172.16.199.27", "selfLink": "/api/v1/nodes172.16.199.27", "uid": "0ab9842f-6480-11e7-ae06-000c29420d98", "resourceVersion": "4079", "creationTimestamp": "2017-07-09T08:24:35Z", "labels": { "beta.kubernetes.io/arch": "amd64", "beta.kubernetes.io/os": "linux", "kubernetes.io/hostname": "172.16.199.27" }, "annotations": { "node.alpha.kubernetes.io/ttl": "0", "volumes.kubernetes.io/controller-managed-attach-detach": "true" } }, "spec": { "externalID": "172.16.199.27" }, "status": { "capacity": { "cpu": "2", "memory": "2032140Ki", "pods": "110" }, "allocatable": { "cpu": "2", "memory": "1929740Ki", "pods": "110" }, "conditions": [ { "type": "OutOfDisk", "status": "False", "lastHeartbeatTime": "2017-07-09T12:55:45Z", "lastTransitionTime": "2017-07-09T08:24:35Z", "reason": "KubeletHasSufficientDisk", "message": "kubelet has sufficient disk space available" }, { "type": "MemoryPressure", "status": "False", "lastHeartbeatTime": "2017-07-09T12:55:45Z", "lastTransitionTime": "2017-07-09T08:24:35Z", "reason": "KubeletHasSufficientMemory", "message": "kubelet has sufficient memory available" }, { "type": "DiskPressure", "status": "False", "lastHeartbeatTime": "2017-07-09T12:55:45Z", "lastTransitionTime": "2017-07-09T08:24:35Z", "reason": "KubeletHasNoDiskPressure", "message": "kubelet has no disk pressure" }, { "type": "Ready", "status": "True", "lastHeartbeatTime": "2017-07-09T12:55:45Z", "lastTransitionTime": "2017-07-09T08:26:48Z", "reason": "KubeletReady", "message": "kubelet is posting ready status" } ], "addresses": [ { "type": "LegacyHostIP", "address": "172.16.199.27" }, { "type": "InternalIP", "address": "172.16.199.27" }, { "type": "Hostname", "address": "172.16.199.27" } ], "daemonEndpoints": { "kubeletEndpoint": { "Port": 10250 } }, "nodeInfo": { "machineID": "0edb716e1cf347faa490b2a81c5e6dcd", "systemUUID": "A89B4D56-77F4-B627-417C-F26AE2AE1179", "bootID": "030162c8-a2ff-4682-82cc-31cdb1b2d7b6", "kernelVersion": "3.10.0-514.21.2.el7.x86_64", "osImage": "CentOS Linux 7 (Core)", "containerRuntimeVersion": "docker://Unknown", "kubeletVersion": "v1.6.7", "kubeProxyVersion": "v1.6.7", "operatingSystem": "linux", "architecture": "amd64" }, "images": [ { "names": [ "index.alauda.cn/georce/router:latest" ], "sizeBytes": 139067018 }, { "names": [ "myf5/busybox-with-pipework-eth1:latest" ], "sizeBytes": 1110190 }, { "names": [ "busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f", "busybox:latest" ], "sizeBytes": 1109996 } ] } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@docker1 scripts]# curl http://localhost:8080/api { "kind": "APIVersions", "versions": [ "v1" ], "serverAddressByClientCIDRs": [ { "clientCIDR": "0.0.0.0/0", "serverAddress": "172.16.199.17:6443" <==apiserver的外部访问,本测试未配置证书,实际不能访问 } ] } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 |
[root@docker1 scripts]# curl http://localhost:8080/api/v1 { "kind": "APIResourceList", "groupVersion": "v1", "resources": [ { "name": "bindings", "namespaced": true, "kind": "Binding", "verbs": [ "create" ] }, { "name": "componentstatuses", "namespaced": false, "kind": "ComponentStatus", "verbs": [ "get", "list" ], "shortNames": [ "cs" ] }, { "name": "configmaps", "namespaced": true, "kind": "ConfigMap", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ], "shortNames": [ "cm" ] }, { "name": "endpoints", "namespaced": true, "kind": "Endpoints", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ], "shortNames": [ "ep" ] }, { "name": "events", "namespaced": true, "kind": "Event", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ], "shortNames": [ "ev" ] }, { "name": "limitranges", "namespaced": true, "kind": "LimitRange", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ], "shortNames": [ "limits" ] }, { "name": "namespaces", "namespaced": false, "kind": "Namespace", "verbs": [ "create", "delete", "get", "list", "patch", "update", "watch" ], "shortNames": [ "ns" ] }, { "name": "namespaces/finalize", "namespaced": false, "kind": "Namespace", "verbs": [ "update" ] }, { "name": "namespaces/status", "namespaced": false, "kind": "Namespace", "verbs": [ "get", "patch", "update" ] }, { "name": "nodes", "namespaced": false, "kind": "Node", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "proxy", "update", "watch" ], "shortNames": [ "no" ] }, { "name": "nodes/proxy", "namespaced": false, "kind": "Node", "verbs": [] }, { "name": "nodes/status", "namespaced": false, "kind": "Node", "verbs": [ "get", "patch", "update" ] }, { "name": "persistentvolumeclaims", "namespaced": true, "kind": "PersistentVolumeClaim", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ], "shortNames": [ "pvc" ] }, { "name": "persistentvolumeclaims/status", "namespaced": true, "kind": "PersistentVolumeClaim", "verbs": [ "get", "patch", "update" ] }, { "name": "persistentvolumes", "namespaced": false, "kind": "PersistentVolume", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ], "shortNames": [ "pv" ] }, { "name": "persistentvolumes/status", "namespaced": false, "kind": "PersistentVolume", "verbs": [ "get", "patch", "update" ] }, { "name": "pods", "namespaced": true, "kind": "Pod", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "proxy", "update", "watch" ], "shortNames": [ "po" ] }, { "name": "pods/attach", "namespaced": true, "kind": "Pod", "verbs": [] }, { "name": "pods/binding", "namespaced": true, "kind": "Binding", "verbs": [ "create" ] }, { "name": "pods/eviction", "namespaced": true, "kind": "Eviction", "verbs": [ "create" ] }, { "name": "pods/exec", "namespaced": true, "kind": "Pod", "verbs": [] }, { "name": "pods/log", "namespaced": true, "kind": "Pod", "verbs": [ "get" ] }, { "name": "pods/portforward", "namespaced": true, "kind": "Pod", "verbs": [] }, { "name": "pods/proxy", "namespaced": true, "kind": "Pod", "verbs": [] }, { "name": "pods/status", "namespaced": true, "kind": "Pod", "verbs": [ "get", "patch", "update" ] }, { "name": "podtemplates", "namespaced": true, "kind": "PodTemplate", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ] }, { "name": "replicationcontrollers", "namespaced": true, "kind": "ReplicationController", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ], "shortNames": [ "rc" ] }, { "name": "replicationcontrollers/scale", "namespaced": true, "kind": "Scale", "verbs": [ "get", "patch", "update" ] }, { "name": "replicationcontrollers/status", "namespaced": true, "kind": "ReplicationController", "verbs": [ "get", "patch", "update" ] }, { "name": "resourcequotas", "namespaced": true, "kind": "ResourceQuota", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ], "shortNames": [ "quota" ] }, { "name": "resourcequotas/status", "namespaced": true, "kind": "ResourceQuota", "verbs": [ "get", "patch", "update" ] }, { "name": "secrets", "namespaced": true, "kind": "Secret", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ] }, { "name": "serviceaccounts", "namespaced": true, "kind": "ServiceAccount", "verbs": [ "create", "delete", "deletecollection", "get", "list", "patch", "update", "watch" ], "shortNames": [ "sa" ] }, { "name": "services", "namespaced": true, "kind": "Service", "verbs": [ "create", "delete", "get", "list", "patch", "proxy", "update", "watch" ] }, { "name": "services/proxy", "namespaced": true, "kind": "Service", "verbs": [] }, { "name": "services/status", "namespaced": true, "kind": "Service", "verbs": [ "get", "patch", "update" ] } ] } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
[root@docker1 scripts]# curl http://localhost:8080/api/v1/endpoints { "kind": "EndpointsList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/endpoints", "resourceVersion": "4142" }, "items": [ { "metadata": { "name": "kubernetes", "namespace": "default", "selfLink": "/api/v1/namespaces/default/endpoints/kubernetes", "uid": "10df54fc-63f1-11e7-b416-000c29420d98", "resourceVersion": "7", "creationTimestamp": "2017-07-08T15:21:07Z" }, "subsets": [ { "addresses": [ { "ip": "172.16.199.17" } ], "ports": [ { "name": "https", "port": 6443, "protocol": "TCP" } ] } ] } ] } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
[root@docker1 scripts]# curl http://localhost:8080/api/v1/services/ { "kind": "ServiceList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/services/", "resourceVersion": "4167" }, "items": [ { "metadata": { "name": "kubernetes", "namespace": "default", "selfLink": "/api/v1/namespaces/default/services/kubernetes", "uid": "10deaa9e-63f1-11e7-b416-000c29420d98", "resourceVersion": "6", "creationTimestamp": "2017-07-08T15:21:07Z", "labels": { "component": "apiserver", "provider": "kubernetes" } }, "spec": { "ports": [ { "name": "https", "protocol": "TCP", "port": 443, "targetPort": 6443 } ], "clusterIP": "169.169.0.1", "type": "ClusterIP", "sessionAffinity": "ClientIP" }, "status": { "loadBalancer": {} } } ] } |
文章评论