View Source K8s.Discovery (k8s v2.6.1)

Kubernetes API Discovery

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.

Functions

This function is deprecated. Use K8s.default_discovery_driver/0 instead.
@spec default_driver() :: module()
This function is deprecated. Use K8s.default_discovery_opts/0 instead.
@spec default_opts() :: Keyword.t()
Link to this function

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

View Source

Kubernetes API Resources supported by the cluster.

@spec 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

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.