K8s (k8s v2.7.0)

View Source

Kubernetes API Client for Elixir

Summary

Functions

Returns the default CAStore

Returns the default driver for discovery.

Returns default opts for the discovery driver. This is also configurable per K8s.Conn

Returns the default HTTP Provider

Functions

default_cacertfile()

@spec default_cacertfile() :: module()

Returns the default CAStore

default_discovery_driver()

@spec default_discovery_driver() :: module()

Returns the default driver for discovery.

Each K8s.Conn can have its own driver set. If unset, this value will be used.

Defaults to K8s.Discovery.Driver.HTTP

Example mix config

In the example below dev and test clusters will use the File driver, while prod will use the HTTP driver.

Cluster names can be atoms or strings, but are internally stored as strings.

use Mix.Config

config :k8s,
  discovery_driver: K8s.Discovery.Driver.File,
  discovery_opts: [config: "test/support/discovery/example.json"]

default_discovery_opts()

@spec default_discovery_opts() :: Keyword.t()

Returns default opts for the discovery driver. This is also configurable per K8s.Conn

default_http_provider()

@spec default_http_provider() :: module()

Returns the default HTTP Provider