Last active
October 28, 2021 06:08
-
-
Save imjasonh/6a0d8e0c0b11cda095f30c4890072d73 to your computer and use it in GitHub Desktop.
Repro pod that fails to start since init container isn't found
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warning FailedMount 1m (x8 over 2m) kubelet, gke-cluster-1-default-pool-f1d9d3b1-x598 MountVolume.SetUp failed for volume "podinfo-init" : container init not found | |
Warning FailedMount 3s kubelet, gke-cluster-1-default-pool-f1d9d3b1-x598 Unable to mount volumes for pod "pod_default(bdca098f-7b0a-11e8-b5dd-42010a8e007f)": timeout expired waiting for volumes to attach or mount for pod "default"/"pod". list of unmounted volumes=[podinfo-init]. list of unattached volumes=[podinfo-init podinfo-real default-token-pkttv] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: pod | |
spec: | |
restartPolicy: Never | |
initContainers: | |
- name: init | |
image: ubuntu | |
args: ['cat', '/etc/podinfo/cpu'] | |
resources: | |
requests: | |
cpu: '.25' | |
limits: | |
cpu: '.25' | |
volumeMounts: | |
- name: podinfo-init | |
mountPath: /etc/podinfo | |
containers: | |
- name: real | |
image: ubuntu | |
args: ['cat', '/etc/podinfo/cpu'] | |
resources: | |
requests: | |
cpu: '.25' | |
limits: | |
cpu: '.25' | |
volumeMounts: | |
- name: podinfo-real | |
mountPath: /etc/podinfo | |
volumes: | |
- name: podinfo-init | |
downwardAPI: | |
items: | |
- path: 'cpu' | |
resourceFieldRef: | |
containerName: 'init' | |
resource: 'requests.cpu' | |
- name: podinfo-real | |
downwardAPI: | |
items: | |
- path: 'cpu' | |
resourceFieldRef: | |
containerName: 'real' | |
resource: 'requests.cpu' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: projected | |
spec: | |
restartPolicy: Never | |
initContainers: | |
- name: init | |
image: ubuntu | |
args: ['cat', '/etc/podinfo/cpu'] | |
resources: | |
requests: | |
cpu: '.25' | |
limits: | |
cpu: '.25' | |
volumeMounts: | |
- name: podinfo-init | |
mountPath: /etc/podinfo | |
containers: | |
- name: real | |
image: ubuntu | |
args: ['cat', '/etc/podinfo/cpu'] | |
resources: | |
requests: | |
cpu: '.25' | |
limits: | |
cpu: '.25' | |
volumeMounts: | |
- name: podinfo-real | |
mountPath: /etc/podinfo | |
volumes: | |
- name: podinfo-init | |
projected: | |
sources: | |
- downwardAPI: | |
items: | |
- path: 'cpu' | |
resourceFieldRef: | |
containerName: 'init' | |
resource: 'requests.cpu' | |
- name: podinfo-real | |
projected: | |
sources: | |
- downwardAPI: | |
items: | |
- path: 'cpu' | |
resourceFieldRef: | |
containerName: 'real' | |
resource: 'requests.cpu' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment