Skip to content

feat: add hostPathVolume (docker) #3277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tscuite
Copy link

@tscuite tscuite commented Apr 14, 2025

Customizing the Shell Pod

You can also customize the shell pod by adding a hostPathVolume to your shell pod. This allows you to mount a local directory or file into the shell pod. For example, if you want to mount the Docker socket into the shell pod, you can do so as follows:

k9s:
  shellPod:
    hostPathVolume:
    - name: docker-socket
      # Mount the Docker socket into the shell pod
      mountPath: /var/run/docker.sock
      # The path on the host to mount
      hostPath: /var/run/docker.sock
      readOnly: true

This will mount the Docker socket into the shell pod at /var/run/docker.sock and make it read-only. You can also mount any other directory or file in a similar way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant