Skip to content

Instantly share code, notes, and snippets.

@kahou82
Last active March 3, 2020 23:31
Show Gist options
  • Save kahou82/30c5d85a38ee8c23a6844906ea6dae67 to your computer and use it in GitHub Desktop.
Save kahou82/30c5d85a38ee8c23a6844906ea6dae67 to your computer and use it in GitHub Desktop.
curl $APISERVER/api/v1/namespaces/default/pods --header "Authorization: Bearer $TOKEN" -k
{
"kind": "PodList",
"apiVersion": "v1",
"metadata": {
"selfLink": "/api/v1/namespaces/default/pods",
"resourceVersion": "788809"
},
"items": [
{
"metadata": {
"name": "pod-1-76ffd877f8-n8v5s",
"generateName": "pod-1-76ffd877f8-",
"namespace": "default",
"selfLink": "/api/v1/namespaces/default/pods/pod-1-76ffd877f8-n8v5s",
"uid": "f8342227-5cd2-11ea-8278-005056954bf3",
"resourceVersion": "788044",
"creationTimestamp": "2020-03-02T22:12:56Z",
"labels": {
"pod-template-hash": "76ffd877f8",
"run": "pod-1"
},
"annotations": {
"cni.projectcalico.org/podIP": "192.168.5.4/32"
},
"ownerReferences": [
{
"apiVersion": "apps/v1",
"kind": "ReplicaSet",
"name": "pod-1-76ffd877f8",
"uid": "f830f9fd-5cd2-11ea-8278-005056954bf3",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"spec": {
"volumes": [
{
"name": "default-token-vkmfv",
"secret": {
"secretName": "default-token-vkmfv",
"defaultMode": 420
}
}
],
"containers": [
{
"name": "pod-1",
"image": "kahou82/kubia",
"resources": {
},
"volumeMounts": [
{
"name": "default-token-vkmfv",
"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": "kahou-hxap-tenant-1-node-gr-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,
"enableServiceLinks": true
},
"status": {
"phase": "Running",
"conditions": [
{
"type": "Initialized",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-03-02T22:12:55Z"
},
{
"type": "Ready",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-03-02T22:13:17Z"
},
{
"type": "ContainersReady",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-03-02T22:13:17Z"
},
{
"type": "PodScheduled",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-03-02T22:12:56Z"
}
],
"hostIP": "10.8.124.32",
"podIP": "192.168.5.4",
"startTime": "2020-03-02T22:12:55Z",
"containerStatuses": [
{
"name": "pod-1",
"state": {
"running": {
"startedAt": "2020-03-02T22:13:16Z"
}
},
"lastState": {
},
"ready": true,
"restartCount": 0,
"image": "kahou82/kubia:latest",
"imageID": "docker-pullable://kahou82/kubia@sha256:5d4c6f43afd6d0d06ce9956417d127a6e6318e5be07776658d9b57f1933c24f9",
"containerID": "docker://213ac488820b53961d42cc2ea7cda3a6f4084151ec893dce4e19dbf325da0872"
}
],
"qosClass": "BestEffort"
}
},
{
"metadata": {
"name": "test-769bb47588-lvcp7",
"generateName": "test-769bb47588-",
"namespace": "default",
"selfLink": "/api/v1/namespaces/default/pods/test-769bb47588-lvcp7",
"uid": "f03515da-59bd-11ea-8278-005056954bf3",
"resourceVersion": "10477",
"creationTimestamp": "2020-02-28T00:04:50Z",
"labels": {
"pod-template-hash": "769bb47588",
"run": "test"
},
"annotations": {
"cni.projectcalico.org/podIP": "192.168.4.6/32"
},
"ownerReferences": [
{
"apiVersion": "apps/v1",
"kind": "ReplicaSet",
"name": "test-769bb47588",
"uid": "f02da06a-59bd-11ea-8278-005056954bf3",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"spec": {
"volumes": [
{
"name": "default-token-vkmfv",
"secret": {
"secretName": "default-token-vkmfv",
"defaultMode": 420
}
}
],
"containers": [
{
"name": "test",
"image": "kahou82/kubia",
"resources": {
},
"volumeMounts": [
{
"name": "default-token-vkmfv",
"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": "kahou-hxap-tenant-1-node-gr-1",
"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,
"enableServiceLinks": true
},
"status": {
"phase": "Running",
"conditions": [
{
"type": "Initialized",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-02-28T00:04:50Z"
},
{
"type": "Ready",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-02-28T00:05:08Z"
},
{
"type": "ContainersReady",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-02-28T00:05:08Z"
},
{
"type": "PodScheduled",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-02-28T00:04:50Z"
}
],
"hostIP": "10.8.124.31",
"podIP": "192.168.4.6",
"startTime": "2020-02-28T00:04:50Z",
"containerStatuses": [
{
"name": "test",
"state": {
"running": {
"startedAt": "2020-02-28T00:05:07Z"
}
},
"lastState": {
},
"ready": true,
"restartCount": 0,
"image": "kahou82/kubia:latest",
"imageID": "docker-pullable://kahou82/kubia@sha256:5d4c6f43afd6d0d06ce9956417d127a6e6318e5be07776658d9b57f1933c24f9",
"containerID": "docker://660482c127138247171d3ed30f9acfcada7e30850d22b7da8fbbc593f804bbbc"
}
],
"qosClass": "BestEffort"
}
}
]
{
"kind": "PodList",
"apiVersion": "v1",
"metadata": {
"selfLink": "/api/v1/namespaces/default/pods",
"resourceVersion": "996948"
},
"items": [
{
"metadata": {
"name": "pod-1-76ffd877f8-n8v5s",
"generateName": "pod-1-76ffd877f8-",
"namespace": "default",
"selfLink": "/api/v1/namespaces/default/pods/pod-1-76ffd877f8-n8v5s",
"uid": "f8342227-5cd2-11ea-8278-005056954bf3",
"resourceVersion": "788044",
"creationTimestamp": "2020-03-02T22:12:56Z",
"labels": {
"pod-template-hash": "76ffd877f8",
"run": "pod-1"
},
"annotations": {
"cni.projectcalico.org/podIP": "192.168.5.4/32"
},
"ownerReferences": [
{
"apiVersion": "apps/v1",
"kind": "ReplicaSet",
"name": "pod-1-76ffd877f8",
"uid": "f830f9fd-5cd2-11ea-8278-005056954bf3",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"spec": {
"volumes": [
{
"name": "default-token-vkmfv",
"secret": {
"secretName": "default-token-vkmfv",
"defaultMode": 420
}
}
],
"containers": [
{
"name": "pod-1",
"image": "kahou82/kubia",
"resources": {
},
"volumeMounts": [
{
"name": "default-token-vkmfv",
"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": "kahou-hxap-tenant-1-node-gr-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,
"enableServiceLinks": true
},
"status": {
"phase": "Running",
"conditions": [
{
"type": "Initialized",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-03-02T22:12:55Z"
},
{
"type": "Ready",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-03-02T22:13:17Z"
},
{
"type": "ContainersReady",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-03-02T22:13:17Z"
},
{
"type": "PodScheduled",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-03-02T22:12:56Z"
}
],
"hostIP": "10.8.124.32",
"podIP": "192.168.5.4",
"startTime": "2020-03-02T22:12:55Z",
"containerStatuses": [
{
"name": "pod-1",
"state": {
"running": {
"startedAt": "2020-03-02T22:13:16Z"
}
},
"lastState": {
},
"ready": true,
"restartCount": 0,
"image": "kahou82/kubia:latest",
"imageID": "docker-pullable://kahou82/kubia@sha256:5d4c6f43afd6d0d06ce9956417d127a6e6318e5be07776658d9b57f1933c24f9",
"containerID": "docker://213ac488820b53961d42cc2ea7cda3a6f4084151ec893dce4e19dbf325da0872"
}
],
"qosClass": "BestEffort"
}
},
{
"metadata": {
"name": "test-769bb47588-lvcp7",
"generateName": "test-769bb47588-",
"namespace": "default",
"selfLink": "/api/v1/namespaces/default/pods/test-769bb47588-lvcp7",
"uid": "f03515da-59bd-11ea-8278-005056954bf3",
"resourceVersion": "10477",
"creationTimestamp": "2020-02-28T00:04:50Z",
"labels": {
"pod-template-hash": "769bb47588",
"run": "test"
},
"annotations": {
"cni.projectcalico.org/podIP": "192.168.4.6/32"
},
"ownerReferences": [
{
"apiVersion": "apps/v1",
"kind": "ReplicaSet",
"name": "test-769bb47588",
"uid": "f02da06a-59bd-11ea-8278-005056954bf3",
"controller": true,
"blockOwnerDeletion": true
}
]
},
"spec": {
"volumes": [
{
"name": "default-token-vkmfv",
"secret": {
"secretName": "default-token-vkmfv",
"defaultMode": 420
}
}
],
"containers": [
{
"name": "test",
"image": "kahou82/kubia",
"resources": {
},
"volumeMounts": [
{
"name": "default-token-vkmfv",
"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": "kahou-hxap-tenant-1-node-gr-1",
"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,
"enableServiceLinks": true
},
"status": {
"phase": "Running",
"conditions": [
{
"type": "Initialized",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-02-28T00:04:50Z"
},
{
"type": "Ready",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-02-28T00:05:08Z"
},
{
"type": "ContainersReady",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-02-28T00:05:08Z"
},
{
"type": "PodScheduled",
"status": "True",
"lastProbeTime": null,
"lastTransitionTime": "2020-02-28T00:04:50Z"
}
],
"hostIP": "10.8.124.31",
"podIP": "192.168.4.6",
"startTime": "2020-02-28T00:04:50Z",
"containerStatuses": [
{
"name": "test",
"state": {
"running": {
"startedAt": "2020-02-28T00:05:07Z"
}
},
"lastState": {
},
"ready": true,
"restartCount": 0,
"image": "kahou82/kubia:latest",
"imageID": "docker-pullable://kahou82/kubia@sha256:5d4c6f43afd6d0d06ce9956417d127a6e6318e5be07776658d9b57f1933c24f9",
"containerID": "docker://660482c127138247171d3ed30f9acfcada7e30850d22b7da8fbbc593f804bbbc"
}
],
"qosClass": "BestEffort"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment