(kubernetes-dev to bcc) You can do it like this:
kubectl run --attach testnew --image=imagename --requests=cpu=200m --command -- /bin/bash -c "service nginx start && while true; do echo bye; sleep 10;done" I replaced -it with --attach because in this example you aren't passing anything in via stdin, nor do you need a TTY, but feel free to adjust as needed. HTH, Andy On Wed, Aug 2, 2017 at 3:59 AM, Eswari <tolikeswari.k...@gmail.com> wrote: > Hello All, > > *kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>* > > *kubectl run -it testnew --image=imagename --command -- > "/bin/bash","-c","service nginx start && while true; do echo bye; sleep > 10;done" --requests=cpu=200m* > > I have to run 2 commands at a time > 1. bash > 2.service nginx start > how can I pass those by using the above command > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Kubernetes developer/contributor discussion" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kubernetes-dev+unsubscr...@googlegroups.com. > To post to this group, send email to kubernetes-...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/kubernetes-dev/6b04535c-7943-4e35-bd89-3796e07faa6e% > 40googlegroups.com > <https://groups.google.com/d/msgid/kubernetes-dev/6b04535c-7943-4e35-bd89-3796e07faa6e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.