View Source K8s.Discovery (k8s v1.1.1)

Kubernetes API Discovery

Link to this section Summary

Functions

default_driver() deprecated
default_opts() deprecated

Kubernetes API Resources supported by the cluster.

Discovery the URL for a K8s.Conn and K8s.Operation

Kubernetes API Versions supported by the cluster.

Link to this section Functions

This function is deprecated. Use K8s.default_discovery_driver/0 instead.

Specs

default_driver() :: module()
This function is deprecated. Use K8s.default_discovery_opts/0 instead.

Specs

default_opts() :: Keyword.t()
Link to this function

resources(api_version, conn, opts \\ [])

View Source

Kubernetes API Resources supported by the cluster.

Specs

url_for(K8s.Conn.t(), K8s.Operation.t()) ::
  {:ok, String.t()} | {:error, K8s.Discovery.Error.t()}

Discovery the URL for a K8s.Conn and K8s.Operation

examples

Examples

iex> {:ok, conn} = K8s.Conn.from_file("./test/support/kube-config.yaml")
...> op = K8s.Operation.build(:get, "apps/v1", :deployments, [namespace: "default", name: "nginx"])
...> K8s.Discovery.url_for(conn, op)
{:ok, "https://localhost:6443/apis/apps/v1/namespaces/default/deployments/nginx"}
Link to this function

versions(conn, opts \\ [])

View Source

Kubernetes API Versions supported by the cluster.