Getting a shell to a running container in a pod

Report a typo

Assume that a pod is deployed on a Kubernetes cluster with the following pod definition file:

apiVersion: v1
kind: Pod
metadata:
  name: busyboxes
spec:
  containers:
  - name: busybox1
    image: busybox
    command: ['sh', '-c', 'echo "HelloWorld from busybox1" && sleep 30']
  - name: busybox2
    image: busybox
    command: ['sh', '-c', 'echo "HelloWorld from busybox2" && sleep 10']

Write a command to get the shell to the running container busybox1.

Please use /bin/sh as an argument to the command. Also, write your answer such that there is only one space between words in the command.
Enter a short text
___

Create a free account to access the full topic