question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for browsing file system of Kubernetes pods (containers)

See original GitHub issue

For example see: https://marketplace.visualstudio.com/items?itemName=sandipchitale.kubernetes-file-system-explorer.

Basically uses:

kubectl exec -it podname -c containername -- ls /

to get the listings of files starting at /. Show them as tree nodes. Also using the command:

kubectl exec -it podname -c containername -- cat /path/to/file

and showing the returned content in a editor.

BTW the extension also shows the initContainers and Containers in a pod. Shows the filesystems of the running containers.

Both supported by the extension above.

Lastly even better option would be to support dual pane file browser for local and container filesystem. Use the the:

kubectl cp fom podname:/to

to copy files from/to.

Use the https://code.visualstudio.com/api/references/vscode-api#FileSystemProvider API to implement the container filesystem browser.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
itowlsoncommented, Nov 4, 2019

This is super cool! Thank you for letting us know about this @sandipchitale! Is there anything specifically you’d like the core extension to do? Because it looks like your project is working great as an extension that builds on top via the API, and if we implemented this ourselves then it would just suck the oxygen out of your project. But if there are limitations in the core extension API that are making your life harder, or if we can amplify or contribute to your work, let’s talk!

Thanks for letting us know about this!

cc @squillace

0reactions
sandipchitalecommented, Nov 27, 2019

For anyone coming here…the above extension supports:

  • shelling into nodes using nsenter
  • exploration of container files, viewing, tailing, kubectl cp from/to container folders and files to local folder and files

BTW this issue can be closed if there are no plans to implement the issue functionality in the Kubernetes extension’s code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add support for browsing file system of Kubernetes pods ...
Shows the filesystems of the running containers. Both supported by the extension above. Lastly even better option would be to support dual pane ......
Read more >
Pods - Kubernetes
A Pod is similar to a set of containers with shared namespaces and shared filesystem volumes. Using Pods. The following is an example...
Read more >
Configure a Pod to Use a Volume for Storage - Kubernetes
This page shows how to configure a Pod to use a Volume for storage. A Container's file system lives only as long as...
Read more >
Configure a Security Context for a Pod or Container
Configure volume permission and ownership change policy for Pods ... By default, Kubernetes recursively changes ownership and permissions for the ...
Read more >
Resource Management for Pods and Containers - Kubernetes
When you specify a Pod, you can optionally specify how much of each resource a container needs. The most common resources to specify...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found