Computer scienceSystem administration and DevOpsKubernetesRunning applications on Kubernetes

Working with a pod

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 into the running container busybox1. and run the /bin/sh command.

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