Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
If you need to run shell instructions inside your Kubernetes cluster, then you should utilize the kubectl run
command.
kubectl run --image=<imagename> <title> -restart=By no means -it --rm -- /bin/sh -c "<command>"
Breaking this down, you go in an imagename
which is the container picture you wish to execute the instructions in, the title
of this non permanent container, after which command
you wish to run in it.
The -it
signifies that it’s an interactive command, whereas --rm
tells the container to not persist as soon as it has accomplished execution.
kubectl run --image=busybox bbox1 --restart=By no means -it --rm -- /bin/sh -c "wget -q0 http://12.34.56.78/"
Observe that the IP above 12.34.56.78
must be swapped out with the IP tackle you wish to run wget
in opposition to. You will get your Cluster IP by operating kuebctl get svc
.