Using helm to define relative hostPath

11/20/2019

I need to use relative volume host path in kubernetes config.

Is it possible to get the working directory in helm?

Something like $(pwd), but inside helm templates.

-- Dennis Meissel
kubernetes
kubernetes-helm

1 Answer

11/20/2019

You can view working directory by running for example:

helm install . --dry-run --debug --set workingDirectory="${PWD}"

It will print the working directory under USER-SUPPLIED VALUES: and COMPUTED VALUES in the last line.

-- KFC_
Source: StackOverflow