Skip to content

robtec/k8s-python-exec-cli

Repository files navigation

Run a Python script on a K8s Pod

This is a small project that allows users to copy a script to a pod for execution

How it works

The pod_exec.py copies a given script to a pod for it to be ran on that pod

Setup

$ pip3 install -r requirements.txt

Example

Log into the k8s cluster before running the next command

$ python3 pod_exec.py --pod python-pod --pvc task-pv-claim --script say_hello.py

 Hello, It's me, I'm running on host python

The above result is from say_hello.py, which is copied to the pod and then executed.

About

Execute python on a remote pod using exec

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •