View Source Kubereq.Kubeconfig.Default (kubereq v0.1.3)
Default pipeline of pluggable steps for loading the Kubeconfig. Tries to build the Kubeconfig from different default settings.
- Checks for the
KUBECONFIG
environment variable. If it is set and pointing to a Kubeconfig file, that file is imported. - Checks for
$HOME/.kube/config
. - Checks if running inside a Cluster and tries to connect using the Service Account Token.
Example
Usage in a pipeline created with Pluggable.StepBuilder
:
defmodule MyApp.KubeconfLoader do
use Pluggable.StepBuilder
step Kubereq.Kubeconfig.Default
end