Skip to content

Instantly share code, notes, and snippets.

@CallMeFoxie
Created June 30, 2017 08:31
Show Gist options
  • Save CallMeFoxie/91d242d08985add50f42431eef76fd00 to your computer and use it in GitHub Desktop.
Save CallMeFoxie/91d242d08985add50f42431eef76fd00 to your computer and use it in GitHub Desktop.
# kubectl get pod affinity-test-0 -o yaml
apiVersion: v1
kind: Pod
metadata:
annotations:
kubernetes.io/created-by: |
{"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"StatefulSet","namespace":"default","name":"affinity-test","uid":"97b1c8eb-03e2-11e7-9173-842b2bfe82f1","apiVersion":"apps/v1beta1","resourceVersion":"34741511"}}
pod.alpha.kubernetes.io/initialized: "true"
creationTimestamp: 2017-06-30T08:29:14Z
generateName: affinity-test-
labels:
app: affinity-test
controller-revision-hash: affinity-test-4234625818
name: affinity-test-0
namespace: default
ownerReferences:
- apiVersion: apps/v1beta1
blockOwnerDeletion: true
controller: true
kind: StatefulSet
name: affinity-test
uid: 97b1c8eb-03e2-11e7-9173-842b2bfe82f1
resourceVersion: "34745877"
selfLink: /api/v1/namespaces/default/pods/affinity-test-0
uid: 336578d8-5d6e-11e7-a549-180373f4ecc0
spec:
containers:
- image: xxx/k8s-pause:3.0
imagePullPolicy: IfNotPresent
name: with-node-affinity
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data
name: test
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: default-token-mhn97
readOnly: true
dnsPolicy: ClusterFirst
hostname: affinity-test-0
nodeName: xxx.tld
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
subdomain: affinity-test
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.alpha.kubernetes.io/notReady
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.alpha.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
volumes:
- name: test
persistentVolumeClaim:
claimName: test-affinity-test-0
- name: default-token-mhn97
secret:
defaultMode: 420
secretName: default-token-mhn97
status:
conditions:
- lastProbeTime: null
lastTransitionTime: 2017-06-30T08:29:14Z
status: "True"
type: Initialized
- lastProbeTime: null
lastTransitionTime: 2017-06-30T08:29:15Z
status: "True"
type: Ready
- lastProbeTime: null
lastTransitionTime: 2017-06-30T08:29:14Z
status: "True"
type: PodScheduled
containerStatuses:
- containerID: docker://400ce12cf1ed5d5670e0b98e79b7cf7c55790b181bc11d609863aa235af6a71d
image: xxx/k8s-pause:3.0
imageID: docker-pullable://xxx/k8s-pause@sha256:6c41826dbe6f0918ac27c8d9f5e0327ebbd16e35deebd5de7418b88002a2d21b
lastState: {}
name: with-node-affinity
ready: true
restartCount: 0
state:
running:
startedAt: 2017-06-30T08:29:15Z
hostIP: 192.168.2.139
phase: Running
podIP: 172.24.13.4
qosClass: BestEffort
startTime: 2017-06-30T08:29:14Z
# kubectl get pod affinity-test-1 -o yaml
apiVersion: v1
kind: Pod
metadata:
annotations:
kubernetes.io/created-by: |
{"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"StatefulSet","namespace":"default","name":"affinity-test","uid":"97b1c8eb-03e2-11e7-9173-842b2bfe82f1","apiVersion":"apps","resourceVersion":"6309335"}}
pod.alpha.kubernetes.io/initialized: "true"
pod.beta.kubernetes.io/hostname: affinity-test-1
pod.beta.kubernetes.io/subdomain: affinity-test
creationTimestamp: 2017-03-08T10:03:42Z
deletionGracePeriodSeconds: 30
deletionTimestamp: 2017-06-30T08:30:07Z
generateName: affinity-test-
labels:
app: affinity-test
name: affinity-test-1
namespace: default
ownerReferences:
- apiVersion: apps/v1beta1
controller: true
kind: StatefulSet
name: affinity-test
uid: 97b1c8eb-03e2-11e7-9173-842b2bfe82f1
resourceVersion: "34745974"
selfLink: /api/v1/namespaces/default/pods/affinity-test-1
uid: 82cc0e6e-03e6-11e7-95ee-180373f4ecc0
spec:
containers:
- image: xxx/k8s-pause:3.0
imagePullPolicy: IfNotPresent
name: with-node-affinity
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data
name: test
dnsPolicy: ClusterFirst
nodeName: xxx.tld
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: test
persistentVolumeClaim:
claimName: test-affinity-test-1
status:
conditions:
- lastProbeTime: null
lastTransitionTime: 2017-06-30T07:43:21Z
status: "True"
type: Initialized
- lastProbeTime: null
lastTransitionTime: 2017-06-30T08:29:37Z
message: 'containers with unready status: [with-node-affinity]'
reason: ContainersNotReady
status: "False"
type: Ready
- lastProbeTime: null
lastTransitionTime: 2017-06-30T07:43:21Z
status: "True"
type: PodScheduled
containerStatuses:
- containerID: docker://27676954fb60793e0ba7053d118bad3812c664b397b24d12934c48cbb362c157
image: xxx/k8s-pause:3.0
imageID: docker-pullable://xxx/k8s-pause@sha256:6c41826dbe6f0918ac27c8d9f5e0327ebbd16e35deebd5de7418b88002a2d21b
lastState: {}
name: with-node-affinity
ready: false
restartCount: 0
state:
terminated:
containerID: docker://27676954fb60793e0ba7053d118bad3812c664b397b24d12934c48cbb362c157
exitCode: 0
finishedAt: 2017-06-30T08:29:37Z
reason: Completed
startedAt: 2017-06-30T07:51:11Z
hostIP: 192.168.2.141
phase: Running
qosClass: BestEffort
startTime: 2017-06-30T07:43:21Z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment