Help talk:Toolforge/Web/Archives/2019
Appearance
Latest comment: 6 years ago by Dalba in topic Is there any difference between `python shell` and `shell`?
![]() |
Please do not post any new comments on this page. This is a discussion archive See current discussion or the archives index. |
Is there any difference between `python shell` and `shell`?
I don't quite get the difference between these commands:
kubectl exec -it <webservice-podname> -- /bin/bash webservice --backend=kubernetes python shell webservice --backend=kubernetes shell
assuming that I have a python webservice running, will they give access to the same container shell? Dalba (talk) 07:47, 22 February 2019 (UTC)
- Great question! I'll try to break it down line by line.
kubectl exec -it <webservice-podname> -- /bin/bash
- This will open an interactive session running a /bin/bash process in the main container of the given pod. The pod will be left running after the interactive session is terminated.
webservice --backend=kubernetes python shell
- This will start a new Kubernetes pod using the docker-registry.tools.wmflabs.org/toollabs-python-web:latest image with /bin/bash -il as the entry point, wait for the pod to start, and then run kubectl attach --tty --stdin <pod_name> to attach an interactive console to that pod. This pod will be destroyed when the interactive session is terminated.
webservice --backend=kubernetes shell
- This does all the same things as webservice --backend=kubernetes python shell, but using the docker-registry.tools.wmflabs.org/toollabs-php-web:latest (PHP 5.6) image. This is due to php5.6 being the current default type when using the Kubernetes backend.
- --BryanDavis (talk) 22:47, 22 February 2019 (UTC)
- Now it all makes sense. Perfect. Thank you! Dalba (talk) 05:20, 23 February 2019 (UTC)