Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 8 #18

Open
rlam3 opened this issue Nov 23, 2019 · 2 comments
Open

Chapter 8 #18

rlam3 opened this issue Nov 23, 2019 · 2 comments

Comments

@rlam3
Copy link

rlam3 commented Nov 23, 2019

I am receiving the following error when I do

kubectl create -f downward-api-env.yaml
kubectl create -f downward-api-volume.yaml

Error:

╰─ kubectl describe pod downward
Name:               downward
Namespace:          default
Priority:           0
PriorityClassName:  <none>
Node:               minikube/192.168.99.100
Start Time:         Sat, 23 Nov 2019 06:29:59 -0600
Labels:             foo=bar
Annotations:        key1: value1
                    key2:
                      multi
                      line
                      value
Status:             Running
IP:                 172.17.0.7
Containers:
  main:
    Container ID:  docker://2e932a24c20818c552575214caec31cf9fb42ec130b841369a88838fbba73a05
    Image:         busybox
    Image ID:      docker-pullable://busybox@sha256:1303dbf110c57f3edf68d9f5a16c082ec06c4cf7604831669faf2c712260b5a0
    Port:          <none>
    Host Port:     <none>
    Command:
      sleep
      9999999
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       ContainerCannotRun
      Message:      OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:303: getting the final child's pid from pipe caused \"read init-p: connection reset by peer\"": unknown
      Exit Code:    128
      Started:      Sat, 23 Nov 2019 06:32:26 -0600
      Finished:     Sat, 23 Nov 2019 06:32:26 -0600
    Ready:          False
    Restart Count:  4
    Limits:
      cpu:     100m
      memory:  4Mi
    Requests:
      cpu:        15m
      memory:     100Ki
    Environment:  <none>
    Mounts:
      /etc/downward from downward (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-r67m6 (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  downward:
    Type:  DownwardAPI (a volume populated by information about the pod)
    Items:
      metadata.name -> podName
      metadata.namespace -> podNamespace
      metadata.labels -> labels
      metadata.annotations -> annotations
      requests.cpu -> containerCpuRequestMilliCores
      limits.memory -> containerMemoryLimitBytes
  default-token-r67m6:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-r67m6
    Optional:    false
QoS Class:       Burstable
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason                  Age                     From               Message
  ----     ------                  ----                    ----               -------
  Normal   Scheduled               <unknown>               default-scheduler  Successfully assigned default/downward to minikube
  Normal   SandboxChanged          2m46s (x12 over 2m58s)  kubelet, minikube  Pod sandbox changed, it will be killed and re-created.
  Warning  FailedCreatePodSandBox  2m45s (x13 over 2m59s)  kubelet, minikube  Failed create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod "downward": Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:303: getting the final child's pid from pipe caused \"read init-p: connection reset by peer\"": unknown
╰─ minikube version
minikube version: v1.5.2
commit: 792dbf92a1de583fcee76f8791cff12e0c9440ad

╰─ kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.8", GitCommit:"211047e9a1922595eaa3a1127ed365e9299a6c23", GitTreeState:"clean", BuildDate:"2019-10-15T12:11:03Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

I'm not exactly where and why this is failing. If possible, please point me in the right direction. Thanks! @luksa

@taylorturner
Copy link

In the closed issues someone recommended removing the cpu and memory config from the pod yaml. It worked for me.
#17

@guanlinz
Copy link

I was using EKS on AWS to deploy the downward-env pod, there were several errors poped up.

  1. It shows some thing wrong with the CNI
Events:
  Type     Reason                  Age   From               Message
  ----     ------                  ----  ----               -------
  Normal   Scheduled               6s    default-scheduler  Successfully assigned default/downward to ip-172-31-14-144.cn-north-1.compute.internal
  Warning  FailedCreatePodSandBox  0s    kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "865e1d36f580b219c9d4aa21b7fb4d9875132a45666aaa8cf0042c6b615715be" network for pod "downward": networkPlugin cni failed to set up pod "downward_default" network: CNI failed to retrieve network namespace path: cannot find network namespace for the terminated container "865e1d36f580b219c9d4aa21b7fb4d9875132a45666aaa8cf0042c6b615715be"

I thought there must be something wrong with my pod specification file, so I copied directly from the github, but got some memory too low error shows in 2)

  1. Kubernets still complains about the pod memory too low
Minimum memory limit allowed is 6MB

So I modified the memory limit parameter in the pod specification file, it fixed the issue for me.

spec:
  containers:
  - name: main
    image: busybox
    command: ["sleep", "9999999"]
    resources:
      requests:
        cpu: 15m
        memory: 60Mi
      limits:
        cpu: 100m
        memory: 60Mi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants