Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

The hostPath volume#

Sumit Rawal answered on June 23, 2023 Popularity 5/10 Helpfulness 1/10

Contents


More Related Answers

  • hosts path
  • host path in windows
  • Accessing Host’s Resources through hostPath Volumes
  • Types of mounts in hostPath#
  • Running the Pod after mounting hostPath
  • Where to use hostPath#
  • What can we mount using hostPath volume type from a host to Pods and, through them, to containers?

  • The hostPath volume#

    0

    hostPath allows us to mount a file or a directory from a host to Pods and, through them, to containers. Before we discuss the usefulness of this type, we’ll have a short discussion about use-cases when this is not a good choice.

    Do not use hostPath to store a state of an application. Since it mounts a file or a directory from a host into a Pod, it is not fault-tolerant. If the server fails, Kubernetes will schedule the Pod to a healthy node, and the state will be lost.

    For our use case, hostPath works just fine. We’re not using it to preserve state, but to gain access to Docker server running on the same host as the Pod.

    Line 15-18: The hostPath type has only two fields. The path represents the file or a directory we want to mount from the host. Since we want to mount a socket, we set the type accordingly. There are other types we could use.

    Popularity 5/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Tags: whatever
    Link to this answer
    Share Copy Link
    Contributed on Jun 23 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.