https://rancher.com/ logo
#k3s
Title
h

handsome-salesclerk-54324

03/22/2023, 1:18 PM
Does anyone have any pointers on best ways to run a devcontainer in a k3s/k3d cluster?
r

rich-cartoon-70161

03/22/2023, 4:45 PM
No, but I guess general k8s instructions should apply?
h

handsome-salesclerk-54324

03/23/2023, 3:20 PM
Where could I find best guidelines for running a devcontainer in a k8s cluster
r

refined-analyst-8898

03/24/2023, 12:03 AM
@handsome-salesclerk-54324 It sounds like you want to run a container. Here's an example of running the
wget
command inside the
busybox
image in a one-off container.
Copy code
$ kubectl run --stdin --tty --rm busybox --image=<http://quay.io/quay/busybox|quay.io/quay/busybox> --restart=Never -- wget --quiet --output-document=- <http://eth0.me> 
If you don't see a command prompt, try pressing enter.
62.214.79.53
pod "busybox" deleted
ref: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#run
If, for example, you were to replace
wget
and everything after it with
sh
then you would have an interactive Bourne shell running in a container in your cluster.
19 Views