View Source K8s.Conn (k8s v1.1.1)
Handles authentication and connection configuration details for a Kubernetes cluster.
Link to this section Summary
Types
cluster_name
- The cluster name if read from a kubeconfig fileuser_name
- The user name if read from a kubeconfig fileurl
- The Kubernetes API URL
Functions
Reads configuration details from a kubernetes config file.
Generates configuration from kubernetes service account.
Link to this section Types
Specs
t() :: %K8s.Conn{ auth: auth_t(), ca_cert: String.t() | nil, cluster_name: String.t() | nil, discovery_driver: module(), discovery_opts: Keyword.t(), http_provider: module(), insecure_skip_tls_verify: boolean(), middleware: K8s.Middleware.Stack.t(), url: String.t(), user_name: String.t() | nil }
cluster_name
- The cluster name if read from a kubeconfig fileuser_name
- The user name if read from a kubeconfig fileurl
- The Kubernetes API URL
Link to this section Functions
Specs
from_file( binary(), keyword() ) :: {:ok, t()} | {:error, :enoent | K8s.Conn.Error.t()}
Reads configuration details from a kubernetes config file.
Defaults to current-context
.
options
Options
context
sets an alternate contextcluster
set or override the cluster read from the contextuser
set or override the user read from the contextdiscovery_driver
module name to use for discoverydiscovery_opts
options for discovery module
Specs
from_service_account() :: {:ok, t()} | {:error, :enoent | K8s.Conn.Error.t()}
Generates configuration from kubernetes service account.
links
Links
Specs
from_service_account(String.t()) :: {:ok, t()} | {:error, :enoent | K8s.Conn.Error.t()}