Home > Net >  how to run commands after ' kubectl run image command' in kubernetes?
how to run commands after ' kubectl run image command' in kubernetes?

Time:10-26

I need to run ' apt update' and ' apt install mysql-server' after Kubernetes run command:

kubectl run -i --tty ubuntu1 --image=ubuntu --restart=Never -- bash

need to add apt update & apt install mysql-server along the above cmd.

CodePudding user response:

kubectl run -it ubuntu1 --image=ubuntu --restart=Never -- bash -c "apt update; apt install mysql-server; bash"

  • Related