View Source Kubereq.Kubeconfig.Default (kubereq v0.4.0)

Default pipeline of pluggable steps for loading the Kubeconfig. Tries to build the Kubeconfig from different default settings.

  1. Checks for the KUBECONFIG environment variable. If it is set and pointing to a Kubeconfig file, that file is imported.
  2. Checks for $HOME/.kube/config.
  3. 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