How do you create a Kubernetes pod using the busybox image that will execute two commands after the container starts?

Experience Level: Senior
Tags: Kubernetes

Answer

Run the following command:

kubectl run podname --image=busybox -- /bin/sh -c "yourcommand && yourcommand2"

Comments

No Comments Yet.
Be the first to tell us what you think.
Kubernetes Certified Application Developer (CKAD) preparation
Kubernetes Certified Application Developer (CKAD) preparation

Are you learning Kubernetes ? Try our test we designed to help you progress faster.

Test yourself
Kubernetes
Kubernetes

Are you learning Kubernetes ? Try our test we designed to help you progress faster.

Test yourself