Evaluating org code blocks in a Kubernetes pod
If you use org-babel, you can ask it to run any code blocks in a running kubernetes pod using tramp’s support for kubernetes. This can be achieved with the :dir
option:
#+begin_src python :results output :dir /kubernetes:container-name.pod-name:/path/to/dir/
print("Hello, world!")
#+end_src
You may need to set the options tramp-kubernetes-context
and tramp-kubernetes-namespace
first.