Practice Test - Networking weave - issue on last Question

Hello! I’m having an issue with the last question in “Practice Test - Networking weave”:

A Pod created with:
apiVersion: v1
kind: Pod
metadata:
name: b2
spec:
nodeName: node03
containers:

  • image: ubuntu
    name: b2

Gets created successfully. Subsequently running:

kubectl exec -it b2 – sh -c ‘ip route’

Results in:
error: unable to upgrade connection: container not found (“b2”)

kubectl get pod shows b2 in CrashLoopBackOff

Help?

  • Maren

Hello, maren.peasley
Container is not meant to run an empty process. You have to add process in container. Because you are using ubuntu image and there is no process running. Hope you can add sleep and some values in second to make it live till your work.

apiVersion: v1
kind: Pod
metadata:
   name: b2
spec:
  nodeName: node03
  containers:
   -  image: ubuntu
      name: b2
      command: ["sleep", "4500"]

@player001: That worked! (And a shift from ubuntu -> busybox):
apiVersion: v1
kind: Pod
metadata:
name: b2
spec:
nodeName: node03
containers:

  • image: busybox
    name: b2
    command: [“sleep”, “4500”]

Thanks for your help!

Yeah, basically in the busybox we get already preinstalled networking debugging tools.